If I have a line like this:
for (int i = 0; i < max; i++)
{
///...
}
not using the option "-std=c99" I get an error from the compiler: "error: 'for' loop initial declarations are only allowed in C99 mode".
I only noticed now (sorry): This problem might only apply to header implementations. I get this e.g. for a static c-function implemented(!) in a header-file. I "inherited" this code. At the moment it's "ugly" as this might tell you, but I can't change all this mess at once. :-/
All cpp-file are including the c-files as you suggest though, without the "#ifdef __cplusplus" though.
Might the answer be, header implementation are ambigious in this case and therefore there is no way around this problem?
Or might the missing "ifdef" cure my problem?
I will surely try both things out, but if this already give you another hint and you can point me to one of the two, even better.
I'm very thankful for this answer already!