parse.y (direct_notype_declarator): Add precedence declaration to notype_unqualified_id case.

* parse.y (direct_notype_declarator): Add precedence declaration
	to notype_unqualified_id case.
	* tree.c (ovl_member): Fix for single function in OVL.

From-SVN: r21417
This commit is contained in:
Jason Merrill 1998-07-27 14:38:11 +00:00 committed by Jason Merrill
parent 74a4fbfcc8
commit 92ac31f12b
4 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,10 @@
1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
* parse.y (direct_notype_declarator): Add precedence declaration
to notype_unqualified_id case.
* tree.c (ovl_member): Fix for single function in OVL.
1998-07-27 Dave Brolley <brolley@cygnus.com>
* c-lex.c (yylex): Fix boundary conditions in character literal and

View File

@ -1378,12 +1378,12 @@ static const short yytable[] = { 59,
1224, 704, -340, 1205, 1531, 673, 421, 93, 72, 1133,
245, 389, 55, 1518, 936, -566, 756, 934, 898, 611,
612, 26, 1015, 937, 938, 438, 440, 1547, 1562, 58,
793, -340, -349, 349, 15, 421, 46, 435, 559, 422,
793, -340, -349, 349, 15, 421, 46, 435, -286, 422,
1508, 943, 681, 130, 131, 989, 1139, 101, 94, 1225,
152, 95, 110, 111, 58, 115, 953, 687, 978, 293,
939, -566, 174, 1478, 1421, -349, 138, 1285, 422, -349,
1084, 209, 667, 668, -134, 26, 1484, 1394, 990, 209,
677, 107, 991, 436, 560, -286, 1400, 1401, 979, 1402,
677, 107, 991, 436, -286, -286, 1400, 1401, 979, 1402,
613, 958, 580, -606, 154, 209, 108, 232, 218, -279,
645, 572, -349, 954, 112, 113, 955, 607, -809, 109,
910, 351, 355, 460, 463, 992, 1286, 482, 157, 516,

View File

@ -1317,7 +1317,9 @@ notype_template_declarator:
direct_notype_declarator:
complex_direct_notype_declarator
| notype_unqualified_id
/* This precedence declaration is to prefer this reduce
to the Koenig lookup shift in primary, below. I hate yacc. */
| notype_unqualified_id %prec '('
| notype_template_declarator
| '(' expr_or_declarator ')'
{ $$ = finish_decl_parsing ($2); }

View File

@ -1430,10 +1430,10 @@ ovl_member (fn, ovl)
tree fn;
tree ovl;
{
if (fn == ovl)
return 1;
if (!ovl || TREE_CODE (ovl) != OVERLOAD)
if (ovl == NULL_TREE)
return 0;
if (TREE_CODE (ovl) != OVERLOAD)
return decls_match (ovl, fn);
for (; ovl; ovl = OVL_CHAIN (ovl))
if (decls_match (OVL_FUNCTION (ovl), fn))
return 1;