Commit 1b255e8f by Paolo Carlini Committed by Paolo Carlini

re PR c++/58600 ([c++11] ICE on wrong usage of alignas)

/cp
2014-04-11  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58600
	* name-lookup.c (parse_using_directive): Return early if the
	attribs argument is error_mark_node; use get_attribute_name.

/testsuite
2014-04-11  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58600
	* g++.dg/cpp0x/gen-attrs-58.C: New.
	* g++.dg/cpp0x/gen-attrs-59.C: Likewise.

From-SVN: r209310
parent 4561285b
2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58600
* name-lookup.c (parse_using_directive): Return early if the
attribs argument is error_mark_node; use get_attribute_name.
2014-04-11 Jason Merrill <jason@redhat.com> 2014-04-11 Jason Merrill <jason@redhat.com>
DR 1030 DR 1030
......
...@@ -4019,13 +4019,14 @@ do_using_directive (tree name_space) ...@@ -4019,13 +4019,14 @@ do_using_directive (tree name_space)
void void
parse_using_directive (tree name_space, tree attribs) parse_using_directive (tree name_space, tree attribs)
{ {
tree a;
do_using_directive (name_space); do_using_directive (name_space);
for (a = attribs; a; a = TREE_CHAIN (a)) if (attribs == error_mark_node)
return;
for (tree a = attribs; a; a = TREE_CHAIN (a))
{ {
tree name = TREE_PURPOSE (a); tree name = get_attribute_name (a);
if (is_attribute_p ("strong", name)) if (is_attribute_p ("strong", name))
{ {
if (!toplevel_bindings_p ()) if (!toplevel_bindings_p ())
......
2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58600
* g++.dg/cpp0x/gen-attrs-58.C: New.
* g++.dg/cpp0x/gen-attrs-59.C: Likewise.
2014-04-11 Steve Ellcey <sellcey@mips.com> 2014-04-11 Steve Ellcey <sellcey@mips.com>
Jakub Jelinek <jakub@redhat.com> Jakub Jelinek <jakub@redhat.com>
......
// PR c++/58600
// { dg-do compile { target c++11 } }
namespace N { int i; }
using namespace N alignas(int); // { dg-warning "ignored" }
// PR c++/58600
// { dg-do compile { target c++11 } }
namespace N {}
using namespace N alignas(X); // { dg-error "declared" }
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