From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14991 invoked by alias); 4 Oct 2013 01:05:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 14925 invoked by uid 48); 4 Oct 2013 01:04:56 -0000 From: "paolo.carlini at oracle dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58600] [c++11] ICE on wrong usage of alignas Date: Fri, 04 Oct 2013 01:05:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: paolo.carlini at oracle dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-10/txt/msg00204.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58600 --- Comment #2 from Paolo Carlini --- 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 ())