The BASIC feature of the C language standard permits the use of familiar line numbering:
-
The BASIC feature of the C language standard permits the use of familiar line numbering:
Compiler Explorer - C (x86-64 gcc (trunk))
typedef int BASIC[]; int main() { if ((BASIC) { [20] puts("cruel"), [30] puts("world"), [10] puts("hello"), }); }
(godbolt.org)
You can use an if () statement to see if the feature is supported by your compiler.
-
-
nothackingreplied to lcamtuf :verified: :verified: :verified: last edited by
@lcamtuf Here's a version that works with every C compiler I could find: https://godbolt.org/z/anKvKqxoa
I haven't found one that initializes arrays out of order yet.
Copyright © 2024 NodeBB | Contributors