From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16688 invoked by alias); 25 Feb 2012 12:57:23 -0000 Received: (qmail 16678 invoked by uid 22791); 25 Feb 2012 12:57:22 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 25 Feb 2012 12:57:09 +0000 From: "marc.glisse at normalesup dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/52381] New: asm goto output operands Date: Sat, 25 Feb 2012 13:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: marc.glisse at normalesup dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-02/txt/msg02460.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52381 Bug #: 52381 Summary: asm goto output operands Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: marc.glisse@normalesup.org Hello, asm goto doesn't allow output operands (this is documented). I haven't found an enhancement request about it, but I think it is obvious that it is wanted. What I would like to ask in the meantime is for a more specific error message than: ex.c: In function 'h': ex.c:4:42: error: expected ':' before string constant or in the case of g++: ex.cc: In function 'void h(int)': ex.cc:4:42: error: expected ':' or '::' before string constant ex.cc:4:74: error: undefined named operand 'g_' Something like: "asm goto doesn't allow output operands" would be great. It took me a while to understand what was wrong by reading the doc, even with the nice column indication. silly example (yes, the contraints don't make sense, it doesn't matter) that gave the messages above: void f(int); void g(); void h(int i){ asm goto( "cmpl %1, %0\n\tje %l[g_]" : "+g" (i) : "i" (42) : "cc" : g_); return f(i); g_: return g(); }