This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

__LINE__ and __FILE__ give "Syntax Error" in CCS Editor perspectives.

The use of the predefined macros __LINE__ and __FILE__ (and probably __DATE__, etc) generate "syntax error" warning indicators in the editor perspectives.  This can easily be demonstrated with the following:

        printf ("__LINE__: %d, __FILE__: %s\n", __LINE__, __FILE__);

The line would be flagged as having a syntax error in the margins and underlined in yellow.

We are using a similar printf statement in a custom ASSERT macro which is used in many places and thus indicate many syntax errors.  It is our policy to try to remove all warnings from the code and these "FALSE" warnings hinder this (and clutters the source display).

It appears that the editors are treating __LINE__ and __FILE__ as empty macros which then cause the syntax error.  Work-around-s of defining values for __LINE__ and __FILE__ remove the syntax error warning but then cause compiler errors when the code is compiled.

The compiler properly handles these and produces no warnings and properly values __LINE__ and __FILE__.