News for hackers. Stuff that matters.
Re:C and C++ Prioritize Performance over Correctness by pjmlp on Saturday August 19, 2023 @02:59AM (#37186275)
It definitely isn't.

What page of C standard describes it?

As for the rest of your comment, unless you are using a PDP-11, you will be surprised.

Re:C and C++ Prioritize Performance over Correctness by memefrog on Saturday August 19, 2023 @03:21AM (#37186374)
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)'.
Re:C and C++ Prioritize Performance over Correctness by pjmlp on Saturday August 19, 2023 @06:19AM (#37187267)
Lets make it easier then, what page of K&R C describes inline Assembly?
Re:C and C++ Prioritize Performance over Correctness by memefrog on Saturday August 19, 2023 @06:36AM (#37187360)
[delayed]
Re:C and C++ Prioritize Performance over Correctness by pjmlp on Saturday August 19, 2023 @10:04AM (#37188900)
Likewise 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.

Re:C and C++ Prioritize Performance over Correctness by memefrog on Saturday August 19, 2023 @10:16AM (#37189021)
I 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.

Re:C and C++ Prioritize Performance over Correctness by defrost on Saturday August 19, 2023 @06:36AM (#37187361)
The more important detail is which "standard C" recognises inline asm as a common as dirt C extension.

Page 514 (of version n1256) of the ISO C Standard

Moving target, to be, sure, but it's been there for 20+ years now.

Annex J.5.10 The asm keyword

to quote a stack overflow answer (that sounds a lot like an answer commonly given back in the day on Usenet and #C IRC channels)

     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.
https://www.open-std.org/JTC1/SC22/WG14/

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf