Bug #17352 2010-07-12 13:52
ondra_holub
Global variable expansion consumes backslashes
When a global variable contains sequence of (any number of) backslash characters, the whole sequence is always expanded as one single backslash character.
Example to reproduce: Global variable aaa is defined (in base field) as
a\b\\c\\\\d
In Project/Build Options/Compiler Settings/#defines is added line
AAA="$(#aaa)"
Now start the compilation (compiler is set to display full command line). Command line (with gcc) contains
-DAAA="a\b\c\d"
This problem occures only for global variables. When aaa is custom variable of target and command line is compiler option is modified to
AAA="$(aaa)"
Variable is expanded to
-DAAA="a\b\\c\\\\d"
I think that the variable expansion should be same in both cases and it should allow to enter doubled backslash (I need it for specifying DOS full path, which should be placed in text literal in C code).
- Category
- Application::WrongBehaviour
- Group
- Status
- Open
- Close date
- Assigned to