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
please tell me this is some defensive programming I don't know about
this same kid is trying to run a kali vm inside a windows vm inside windows
@jeremykleiman well at least the types match… ? :D
@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.

@jeremykleiman Has this person ever coded before? Because just looking at that is hurting my soul
@JamesF the other stories I have heard suggest no, but he's a few years into a CS program...
@jeremykleiman Christ, I've seen some pretty bad code about but I'm in first year so I allow it. After that it's just not ok