This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: cpp generates wrong #line directives
Zack Weinberg writes:
> (I hope this is machine-generated code I'm looking at...)
Yes of course. That's the purpose of having #line.
> So the #line is inside a failed conditional block and is therefore
> ignored.
You are right. It's not a cpp bug. I didn't know that #line, like
#error and #include, is ignored during #if 0.
> Maybe you need to move it down after the double #endif there?
I'll have to insert additional #line directives after every #else and
#endif.
Thanks.
Bruno