Commit 7f7c930e by Jason Merrill Committed by Jason Merrill

* decl.c (grokfndecl): Fix my thinko.

From-SVN: r23077
parent f69864aa
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.
......
......@@ -8024,9 +8024,14 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment