* decl.c (grokfndecl): Also check ctype when checking for ::main().

From-SVN: r23123
This commit is contained in:
Jason Merrill 1998-10-16 03:20:33 +00:00 committed by Jason Merrill
parent 925be47cd5
commit 94706a5cfc
2 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,7 @@
1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokfndecl): Also check ctype when checking for ::main().
1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokfndecl): ::main and __builtin_* get C linkage.

View File

@ -8026,6 +8026,7 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
/* context == 0 could mean global scope or not set yet; either is fine
for us here, as we check current_namespace. */
&& DECL_CONTEXT (decl) == NULL_TREE
&& ctype == NULL_TREE
&& current_namespace == global_namespace)
DECL_LANGUAGE (decl) = lang_c;