cpp mishandles \ in filenames
Zack Weinberg
zack@codesourcery.com
Mon Jan 14 13:36:00 GMT 2002
On Mon, Jan 14, 2002 at 07:31:25AM +0000, Neil Booth wrote:
>
> Right. The interpretation of #line and #include is presently correct,
> to the best of my knowledge.
>
> The bug is that we want to be sure that the # lines we output are read
> back in so that in binary they match. In other words, since they are
> read in as a normal string literal the file names need to be escaped,
> which I think is exactly what Mike's original patch did.
Yes, but I want to go through the code and verify that we handle file
names consistently all the way from the initial #line directive to the
assembly dump. Right now, writing
#line 123 "file with\ttab in name"
translates to
.stabs "file with\\ttab in name",132,0,0,.Ltext1
which is wrong, if we believe the standard requires escape sequence
interpretation in #line, and I don't believe Mike's patch addressed
this. (Mind, 2.95 does the same thing.)
I would also like to hear back from comp.std.c on why exactly #line
and #include are inconsistent, if only for the sake of the manual.
zw
More information about the Gcc-bugs
mailing list