This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
C99 spelling of "asm".
- From: "David O'Brien" <obrien at FreeBSD dot org>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 2 Jun 2003 09:19:03 -0700
- Subject: C99 spelling of "asm".
- Organization: The NUXI BSD Group
- Reply-to: obrien at FreeBSD dot org
My read of the C99 standard is that "asm(...)" should be accepted by
"gcc -std=c99 -pedantic":
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' ) ;
However, I get this error:
testasm.c: In function `main':
testasm.c:4: warning: implicit declaration of function `asm'
testasm.c:4: syntax error before ':' token
changing "asm" to "__asm" or using "-std=gnu99 -pedantic" works. Has GCC
not caught up with iso9899:1999, or is there some other reason "asm();"
isn't accepted?
--
-- David (obrien@FreeBSD.org)