Moving the kernel to modern C
Moving the kernel to modern C
Posted Feb 25, 2022 16:51 UTC (Fri) by Wol (subscriber, #4433)In reply to: Moving the kernel to modern C by wtarreau
Parent article: Moving the kernel to modern C
I thought that was allowed in ancient C ...
Unless you mean actually declaring inside the "if" statement ... but I thought declaring after a { was permitted anywhere. I dunno, it's ages since I've programmed C in anger.
But it would be nice to say you can ONLY declare after a {, but that includes things like "int i = 1". You shouldn't be able to do things like "int i; i=1; int j; j=2;", though.
Cheers,
Wol
