Topic : I found pragma for #error, is there something similar for warnings?

Forum : 8051

Original Post
Post Information Post
February 6, 2019 - 4:51pm
Lloyd Slonim

I see the 8051 compiler has #error as a way to throw a compile error. Is there something less severe that shows a warning or a message but is not fatal? Some compilers use #warning but that didn't work. My code uses #warning to advise the user about code config.

Thanks,

Lloyd

Replies
Post Information Post
+1
0
-1
February 15, 2019 - 8:53pm
Lloyd Slonim

There is no support for #warning in Ride, but there is in GCC and SDCC. The interesting thing is that if you use #warning, it's not recognized, so you get a warning! You just can't pass a specific message to the console like with #error.