Email or username:

Password:

Forgot your password?
lcamtuf :verified: :verified: :verified:

The BASIC feature of the C language standard permits the use of familiar line numbering:

godbolt.org/z/dfsKGqYGz

You can use an if () statement to see if the feature is supported by your compiler.

15 comments
Chandler Carruth

@lcamtuf That's disgusting, I love it.

Also, paging @shafik to enjoy every aspect of this wondercode.

Alexandra Magin 🏳️‍🌈

@lcamtuf oh, so your writing about analog electronics was bringing you too much joy and you had to write some cursed C?

Omar Sandoval

@lcamtuf lol. Is the order of evaluation for array initializers well-defined?

lcamtuf :verified: :verified: :verified:

@osandov just don't run it on leap-year Tuesdays and you should be fine

RevK :verified_r:

@lcamtuf that is some proper cursed C there. And can you really guarantee the side effects of an array initialisation will be in order?

RevK :verified_r:

@dalias @lcamtuf I was also trying to get my head around using if() with an array, I’m assuming it is just if(pointer) which is going to be true, as I am unaware of any specially processing of a condition that is an array.

Go Up