Community
Participate
Working Groups
Build Identifier: I20100608-0911 <#error "some text"> is a valid pre-processor statement. When a C-file containing this code fragment is opened in the CEditor, there is an annotation against this code fragment which reports this as invalid. This is due to the fact that in the CPreProcessor class, IASTProblem is created always when #error is encountered. This is incorrect. Reproducible: Always Steps to Reproduce: 1. Open a C-file in C-Editor containing code fragment #error "some text" 2. Editor shows a C/C++ Indexer Marker Annotation which is incorrect since #error "some text" is a valid pre-processor statement
Created attachment 183901 [details] Snapshot contains the location where IASTProblem is created for valid #error preprocessor directive Snapshot contains the location where IASTProblem is created for valid #error preprocessor directive
The directive is valid syntax. However, when an #error directive is found in an active code-branch the program will not compile. Therefore, in such a situation, you do look at a problem that is worth being annotated.