Mindfuck C statements thread

It doesn't matter if the mindfuckery is intentional or not. Oldie but goldie here, you might know it already:

void ( *( *f[] ) () ) ();

Attached: download.png (225x225, 3K)

Other urls found in this thread:

github.com/rust-lang/rust/blob/master/src/test/run-pass/weird-exprs.rs
c-faq.com/decl/spiral.anderson.html
web.archive.org/web/20170512104502/http://ieng9.ucsd.edu/~cs30x/rt_lt.rule.html
stackoverflow.com/questions/49481217/linux-kernels-is-constexpr-macro
twitter.com/SFWRedditVideos

I saw that code in a pdf screenshot posted here a few months ago. Don't remember what it is.

What does this do? C is so stupid man

Clets, when will they ever learn?

>grammars exist
>dude c is so stoopeed rust ftw

Attached: rust shill hd.png (2955x2785, 785K)

Declares f as array of pointer to function returning pointer to function returning void.

>being this defensive
Who hurt you?

>projecting

Attached: smug.png (1631x1571, 124K)

f is an array of pointers to function(s) of no arguments returning void
not hard at all

github.com/rust-lang/rust/blob/master/src/test/run-pass/weird-exprs.rs

Attached: 135.png (165x115, 17K)

is you need guidance
c-faq.com/decl/spiral.anderson.html
web.archive.org/web/20170512104502/http://ieng9.ucsd.edu/~cs30x/rt_lt.rule.html

#define __is_constexpr(x) \
(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))

This one is my favorite, one of the best hacks in the linux kernel. Stack Overflow explanation here stackoverflow.com/questions/49481217/linux-kernels-is-constexpr-macro

int x = 0;
int i = 0;
switch(x) {
for (; i < 5; ++i) {
printf("This is fine.\n);
case 0:
printf("You can switch into a loop just like a goto.\n);
}
default:
break;
}

wut

he's hidden his case statement inside a for loop, so it prints "This is fine" and, as long as x = 0; "You can switch..." until i = 5. If i follow correctly.

switch(x) jumps to the case 0: label which happens to be inside a loop.
So, "You can switch" is printed first. After that the loop is executed 5 times.

#include

int main(){
printf("Hello world.\n");
return 0;
}

Still confuses me.

*stdio.h

*studio.h

>studio.h
Are you retarded?

Retard spotted

sussudio.h

>being this new

>void ( *( *f[] ) () ) ();
Quite useful with callbacks in pure C tbqh, well you use linkedlists instead though usually

so this would be what you use to declare event in C# in example

*(int *)&"%'\0\0"
I'm not proud, but I put this in a recent program of mine