+2002-10-14 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/7176
+ * lex.c (do_identifier): Add another option for the parsing
+ parameter.
+ * parse.y (do_id): Use it.
+
2002-10-11 Mark Mitchell <mark@codesourcery.com>
PR c++/5661
tree args;
{
register tree id;
- int lexing = (parsing == 1);
+ int lexing = (parsing == 1 || parsing == 3);
if (! lexing)
id = lookup_name (token, 0);
/* Remember that this name has been used in the class definition, as per
[class.scope0] */
- if (id && parsing)
+ if (id && parsing && parsing != 3)
maybe_note_name_used_in_class (token, id);
if (id == error_mark_node)
don't do_identifier; we only do that for unqualified
identifiers. */
if (!lastiddecl || TREE_CODE (lastiddecl) != TREE_LIST)
- $$ = do_identifier ($<ttype>-1, 1, NULL_TREE);
+ $$ = do_identifier ($<ttype>-1, 3, NULL_TREE);
else
$$ = $<ttype>-1;
}
+2002-10-14 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/7176
+ * g++.dg/parse/friend1.C: New test.
+ * g++.old-deja/g++.pt/memtemp64.C: Adjust.
+
2002-10-11 Mark Mitchell <mark@codesourcery.com>
PR c++/5661
--- /dev/null
+namespace N {
+ template <typename T>
+ static void f ();
+
+ struct S {
+ friend void N::f<int> ();
+ static void f (int);
+ };
+}
struct S1 {};
template <class T>
-void f(T); // ERROR - original declaration.
+void f(T);
template <class C>
struct S2