From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103135 invoked by alias); 3 Aug 2015 15:47:10 -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 103023 invoked by uid 48); 3 Aug 2015 15:46:57 -0000 From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/67064] Register asm variable broken Date: Mon, 03 Aug 2015 15:47: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: 6.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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: 2015-08/txt/msg00095.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67064 --- Comment #17 from Jason Merrill --- (In reply to Daniel Gutson from comment #15) > (In reply to Jason Merrill from comment #14) > > '-Wpedantic' does not cause warning messages for use of the > > alternate keywords whose names begin and end with '__'. > > Do you refer to the __asm__? Yes. I don't think we should warn about __asm__ either by default or with -pedantic, though perhaps there should be an even-more-pedantic mode that complains about __keywords__ outside system headers. For the original bug, I think force_paren_expr needs to ignore DECL_HARD_REGISTER variables. (In reply to Jens Maurer from comment #16) > Agreed, but this: > > struct s { > int i; > }; > register struct s *reg asm( "si" ); > > (note: no double underscores) should issue a diagnostic for violating > 7.1.1p2 when invoking > > > g++ -std=c++14 -Wall -Wextra -Wpedantic -c reg-asm.cc > > right? It doesn't. Total silence. Yes, that should give a pedwarn.