Bug 288800 - [Preprocessor] __FILE__ macro is not escaped
Summary: [Preprocessor] __FILE__ macro is not escaped
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 6.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 6.0.2   Edit
Assignee: Markus Schorn CLA
QA Contact: Mike Kucera CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2009-09-08 03:59 EDT by Tom Longridge CLA
Modified: 2010-01-14 07:48 EST (History)
1 user (show)

See Also:


Attachments
Fix for bug (1.58 KB, patch)
2009-09-25 06:41 EDT, Richard Miskin CLA
mschorn.eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Longridge CLA 2009-09-08 03:59:10 EDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2
Build Identifier: I20090611-1540

The literal expression obtained from the __FILE__ macro is not an escaped string. This leads to problems attempting to interpret the value of the string.

Reproducible: Always

Steps to Reproduce:
1. Inspect the __FILE__ macro in the DOM AST viewer
2. Inspect the literal string "My\\Path\\a.txt" in the DOM AST viewer
Comment 1 Richard Miskin CLA 2009-09-25 06:41:50 EDT
Created attachment 148094 [details]
Fix for bug

Simple patch for the problem. I've not added a junit test as I'm not sure it's possible to test __FILE__ in a portable manner.
Comment 2 Markus Schorn CLA 2009-09-29 11:43:23 EDT
Thanks Richard,
applied patch for 6.0.2 and 6.1 > 20090929.