cvs commit: src/sys/i386/include profile.h

David O'Brien obrien at FreeBSD.org
Mon Jun 2 09:36:27 PDT 2003


On Mon, Jun 02, 2003 at 09:13:56AM -0700, David O'Brien wrote:
> On Mon, Jun 02, 2003 at 10:56:15AM +0200, Dag-Erling Smorgrav wrote:
> > "David E. O'Brien" <obrien at FreeBSD.org> writes:
> > >   Log:
> > >   Use C99 compatable asm statements.
> > 
> > Wrong.  The keyword reserved by C99 for inline assembly is asm, not
> > __asm.
> 
>     J.5.10 _The_asm_keyword_
> 
>     The 'asm' keyword may be used to insert assembly language directly
>     into the translator output (6.8).  The most common implementation is
>     via a statement of the form:
> 
>         asm ( 'character-string-literal' ) ;
> 
> my read is that the compiler *may* implement it as above, or it may use
> something different.  Since GCC uses
>     <asm keyword> ("character-string-literal" : <constraint> : <constraint> );
> I guess they decided GCC isn't compatable with J.5.10.

I asked the GCC list about this:

    From: Tony Finch <dot at dotat.at>

    Section J.5 is very similar to section G.5 in ISO 9899:1990, so this
    is not a C99 issue. You appear to have missed the fact that the
    annexes are not normative, and that J.5 starts with the text:

    The following extensions are widely used in many systems, but are not
    portable to all implementations. The inclusion of any extension that
    may cause a strictly conforming program to become invalid renders an
    implementation nonconforming. Examples of such extensions are new
    keywords, extra library functions declared in standard headers, or
    predefined macros with names that do not begin with an underscore.


More information about the cvs-src mailing list