+1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
+
+ * decl.c (grokfndecl): Fix my thinko.
+
1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
* tinfo2.cc (fast_compare): Remove.
t = no_linkage_check (TREE_TYPE (decl));
if (t)
{
- if (ANON_AGGRNAME_P (TYPE_IDENTIFIER (t))
- && DECL_LANGUAGE (decl) != lang_c)
- cp_pedwarn ("non-local function `%#D' uses anonymous type", decl);
+ if (ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)))
+ {
+ if (DECL_LANGUAGE (decl) == lang_c)
+ /* Allow this; it's pretty common in C. */;
+ else
+ cp_pedwarn ("non-local function `%#D' uses anonymous type",
+ decl);
+ }
else
cp_pedwarn ("non-local function `%#D' uses local type `%T'",
decl, t);