Topic : Preprocessor: #warning or analogs?

Forum : ST7/STM8

Original Post
Post Information Post
July 13, 2016 - 11:20am
Alexander Sorokin

Hi, It seems that the Raisonance C preprocessor doesn't support either the "#warning", or the "#pragma message" directive. I can't believe any modern compiler may have no facilities like these, so my question is how can I output a message at compile time?

Replies
Post Information Post
+1
0
-1
July 13, 2016 - 11:48am
Etienne Cassin

Hello,

Thanks for the feedback. "#warning" directives doesn't belong to the C standard that why it's not supported. We will try to suppot it in the next release.

Concerning "#pragma" directives, please have a look of our STM8/ST7 compiler manual (page 86) you can find it at C:\Raisonance\Ride\Doc\ST7\RCSTM8.pdf

I hope it helps.

Regards,

+1
0
-1
July 13, 2016 - 11:58am
Alexander Sorokin

Does that mean there is currently no way to output a message at compile time?

+1
0
-1
July 20, 2016 - 8:55am
Etienne Cassin

For the moment you can use "#error" but it will stop the compilation.

We will integrate this option in the next release which will be released in September.

Best Regards