It's not in the ISO C standard (n1570 draft of C2011) as such, but mentioned in annex J (common extensions):
J.5.10 The asm keyword
1 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 );
Annex J is informative, not normative, so an implementation need not provide inline assembly, and if it does it's not prescribed in which form. But it's a widespread extension, though not portable since compilers do indeed implement it differently.
In the C++ standard (n3376 draft of the C++11 standard), it is mentioned in the body of the standard
7.4 The asm declaration [dcl.asm]
1 An asm declaration has the form
asm-definition:
asm ( string-literal ) ;
The asm declaration is conditionally-supported; its meaning is implementation-defined. [ Note: Typically
it is used to pass information through the implementation to an assembler. — end note ]
but also not mandatory, and with implementation-defined interpretation.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…