cpp mishandles \ in filenames

Zack Weinberg zack@codesourcery.com
Thu Jan 10 16:49:00 GMT 2002


On Thu, Jan 10, 2002 at 04:19:58PM -0800, mike stump wrote:
> Someone broke filenames with \ in them when they turned on the new
> preprocessor.  This used to work exactly this way in the old
> preprocessor.  This restores the functionality.  Without this windows
> hosted tools with native filenames are completely screwed.

The "string constant" on a #-line is interpreted the same way as a
double-quote include, i.e. \ escapes are *not* interpreted.  Try your
test again with -S -save-temps, you will see that the proper .file
string appears in the assembly output.

I do not see what else you could mean by "mishandles \ in filenames."
Please clarify.

zw



More information about the Gcc-bugs mailing list