Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jun 2003 09:36:08 -0700
From:      "David O'Brien" <obrien@FreeBSD.org>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/i386/include profile.h
Message-ID:  <20030602163608.GA92164@dragon.nuxi.com>
In-Reply-To: <20030602161356.GA89038@dragon.nuxi.com>
References:  <200306020029.h520TZwK088820@repoman.freebsd.org> <xzphe786eog.fsf@flood.ping.uio.no> <20030602161356.GA89038@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030602163608.GA92164>