This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]