mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-25 21:55:42 +08:00
class.c (note_name_declared_in_class): Make in 'extern "C"' blocks...
2010-08-17 Kai Tietz <kai.tietz@onevision.com> * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks, or if -fms-extensions is enabled check, check permissive. From-SVN: r163300
This commit is contained in:
parent
f9abf412e2
commit
8ce1235bfa
@ -1,3 +1,8 @@
|
||||
2010-08-17 Kai Tietz <kai.tietz@onevision.com>
|
||||
|
||||
* class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
|
||||
or if -fms-extensions is enabled check, check permissive.
|
||||
|
||||
2010-08-09 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/45236
|
||||
|
@ -6807,7 +6807,13 @@ note_name_declared_in_class (tree name, tree decl)
|
||||
= current_class_stack[current_class_depth - 1].names_used;
|
||||
if (!names_used)
|
||||
return;
|
||||
|
||||
/* The C language allows members to be declared with a type of the same
|
||||
name, and the C++ standard says this diagnostic is not required. So
|
||||
allow it in extern "C" blocks unless predantic is specified.
|
||||
Allow it in all cases if -ms-extensions is specified. */
|
||||
if ((!pedantic && current_lang_name == lang_name_c)
|
||||
|| flag_ms_extensions)
|
||||
return;
|
||||
n = splay_tree_lookup (names_used, (splay_tree_key) name);
|
||||
if (n)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user