+2

C pragmas syntax highlight bug

Péter Horváth 11 years ago updated by aahlborg 10 years ago 1

If there is a string after the pragma with a comment between the quotation marks, all of the code after the closing quotation mark are highlighted as strings. with /* ... */ between the quotation marks


Code:

#pragma MESSAGES_COMMENT " /* Text 1234*/ "
int main()
{
  printf("Hello World");
  return 0;
}


Pictures

with /* ... */ between the quotation marks:

Image 182
without /* ... */ between the quotation marks:
Image 183
+1

This will also mess up highlighting in the rest of the file.


#warning "This is a \

multiline string."