This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] asm goto


I have one remark about the syntax of this proposal.
(sorry to come late after the debate)

The current status is, I think :

asm goto ("..." : ... : ... : ... : label-list);

The C++ standard specifies a syntax framework for asms :

asm ( string-literal ) ;

GCC is already going slightly beyond this, because it's accepting
more than a string-literal.  But that's relatively minor.

However, using "asm goto" outside the parentheses goes further in
terms of syntax extension, and I'm not convinced that the need
justifies it.

Moreover, the syntax of asms being already not so easy to understand,
I would like to suggest moving the "goto" inside the asm, so that one
easily sees which arguments are labels (a kind of "named argument").
Something like the following :

asm ("..." : ... : ... : ... : goto (label-list) );

Has this option been considered ?

--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]