diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-10-16 03:20:33 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-10-15 23:20:33 -0400 |
commit | 94706a5cfc9f995e52279c7594d188d826156f19 (patch) | |
tree | 217387c7500246525cc6d8f0dc9fbc5d4c592bf1 /gcc | |
parent | 925be47cd54bcdb5e6da71a37de22ca08f367f83 (diff) | |
download | gcc-94706a5cfc9f995e52279c7594d188d826156f19.zip gcc-94706a5cfc9f995e52279c7594d188d826156f19.tar.gz gcc-94706a5cfc9f995e52279c7594d188d826156f19.tar.bz2 |
* decl.c (grokfndecl): Also check ctype when checking for ::main().
From-SVN: r23123
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/decl.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0958c3b..2a830ee 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 29605a7..75a37a6 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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; |