I'm creating a compiler for a language that outputs GNU C as intermediate code. (yes, I know there's better ways of doing IR, but I'm lazy and I'm going to rewrite it to be self-hosting anyway).
Currently if I make a function with no arguments, my compiler produces
bar foo(){/*Implementation here*/}
Which is not the same as the desired behaviour:
bar foo(void){/*Implementation here*/}
However, I'd like GCC to treat the former as the latter (otherwise I have to make a special case in my code).
Is there a flag for GCC to do this?