diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-12-12 16:41:15 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-12-12 16:41:15 +0000 |
commit | 1ce558243e2c95041ba241042a7c4af53999ed33 (patch) | |
tree | ca189ed953b571a2b77b7df975656cfd2e91ab68 /gcc/cp/class.c | |
parent | 3194b94cc3300022cf2b51bcd18cbc52cab97486 (diff) | |
download | gcc-1ce558243e2c95041ba241042a7c4af53999ed33.tar.gz |
* decl.c (grokdeclarator): Allow field with same name as class
in extern "C".
* decl.c (lookup_name_real): Don't limit field lookup to types.
* class.c (check_member_decl_is_same_in_complete_scope): No error
if icv and x are the same.
* lex.c (do_identifier): Tweak error message.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24269 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 46d162e5087..a73605a96e5 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -4371,7 +4371,9 @@ check_member_decl_is_same_in_complete_scope (t, x) else icv = NULL_TREE; - if (icv + /* This should match pushdecl_class_level. */ + if (icv && icv != x + && flag_optional_diags /* Don't complain about constructors. */ && name != constructor_name (current_class_type) /* Or inherited names. */ |