parse.y (direct_notype_declarator): Add precedence declaration to notype_unqualified_...
authorJason Merrill <jason@yorick.cygnus.com>
Mon, 27 Jul 1998 14:38:11 +0000 (14:38 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 27 Jul 1998 14:38:11 +0000 (10:38 -0400)
* 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

gcc/cp/ChangeLog
gcc/cp/parse.c
gcc/cp/parse.y
gcc/cp/tree.c

index d707577883fd9fc1472e9745e0246a0187ddf024..254e5e99eda206625131fde808250641da043c4f 100644 (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
index 04e517f7c30bd2b762f6ace8421e814e38c84d29..cf34b9885e95622410357b4c58789d53b9fab379 100644 (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,
index c5acf27b22bfe3f145ec7f48d70fdebc94519d82..1113c15ba9565b902efe6efb97c1ebcfa57fd320 100644 (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); }
index 02243282e5e2bafdf54de888cfedd8db86e8724e..dce01cb6724fe1bd80ca778604d08f6e617b1c90 100644 (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;