Commit 8ce1235b by Kai Tietz Committed by Kai Tietz

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
parent f9abf412
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)
{
......
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