omg so my friend in uni got put with a really incapable partner...this guy declared a variable of type void to hold the return value of a void function... https://mastodon.social/media/s6niypQtyJ5u6Cwhvq8
@jeremykleiman this actually compiles?! if so, TIL you can do that.
@slipstream stackoverflow says GCC *could* consider it an error. this kids code didn't compile but my friend didn't tell me if this came up as an error or not. it's just....amazing

@slipstream @jeremykleiman

C is known for letting you shoot your own foot, if desired.

There are very rare cases where this is desired.

But if you do think this behavior is desired, refactor and redesign your code first.