http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58600

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Not sure if we want to do much better than below: it's suboptimal from many
points of view, but simply rejecting the alignas with the right location for
the error message (cmp, clang) as we probably should, requires rather invasive
changes.

Dodji, with your new diagnostic maintainer hat, what do you think? Should we
have interim something like the below, or not?

//////////////

Index: cp/name-lookup.c
===================================================================
--- cp/name-lookup.c    (revision 203192)
+++ cp/name-lookup.c    (working copy)
@@ -3985,13 +3985,14 @@ do_using_directive (tree name_space)
 void
 parse_using_directive (tree name_space, tree attribs)
 {
-  tree a;
-
   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 (!toplevel_bindings_p ())

Reply via email to