3 ms·
C predates the C standard, which describes a common subset of C implementations. It is useful for writing code which works across a variety of implementations.
by memefrog 3y ago
C predates the C standard, which describes a common subset of C implementations. It is useful for writing code which works across a variety of implementations. For example, you can write code that works on the Byzantine optimising compilers, which will attempt to render your code incorrectly if at all possible, but will make strictly conforming programs run very quickly. But it is not necessary to write code to the C standard, and many C implementations do not conform to it. The Plan9 C compiler, for example, expects 'void main(void)' for a program's main function, while the standard requires 'int main(void)'.
- pjmlp 3y agoLets make it easier then, what page of K&R C describes inline Assembly?
- memefrog 3y agoA book about C isn't a comprehensive guide to every C implementation.
- pjmlp 3y agoLikewise compiler specific extensions don't define universal truths about languages, that aren't part of the respective standard. Had you been clever, you would have pointed out that inline Assembly is defined in the ANSI C++ standard, with the mention of asm (content) language construct, leaving the meaning of content implementation defined. As it is also defined in the Ada language standard, Modula-2 standard revision, and Oakwood Guidelines for Oberon-2 implementation. That is the thing mixing up C with compiler specific features, confusing the language for its standard and assuming no other language in the planet offers similar capabilities.
- memefrog 3y agoI am not remotely interested in what the ISO standard says about C, and I am even less interested in what the ANSI standard says about C++, a completely different language. C is not defined by or constrained to the standard. It predates it and every implementation extends it, as is intended by the standard. The person confusing the standard with the language is you.