Community
Participate
Working Groups
Build Identifier: 20110615-0604 The end of certain strings is not correctly recognised. For instance let define BAR as "bar": #define BAR "bar" and use it in a definition of a string: char foo[10] = BAR"("; The semicolon and all code in the next lines is colored blue (color marking a string). The problem is only present if the define ends with 'R' and the string contains a '(' and there is no space between them. Reproducible: Always Steps to Reproduce: 1. Open the following correct code in the CDT-Editor: #define R "bar" void main(void) { char foo[10] = R"("; // all signs after the last '"' are colored blue }
I have committed a fix and test to master and cdt_8_0. Note that R"("; is still interpreted as unterminated raw string even if R is a macro, because the scanner used by the editor has no knowledge about macros. But that's a minor corner case IMO.
*** cdt git genie on behalf of 352544 *** Bug 352544 - the end of certain string definitions (e.g. R"(") is not correctly identified [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=0f2bc1bb5c9df9c6461d6b48623ee4f0990770df
*** cdt git genie on behalf of 352544 *** Bug 352544 - the end of certain string definitions (e.g. R"(") is not correctly identified [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=f60aad128c86e5294328a1384b95d7cda3202bcf