Reputation: 24685
Is there a way that I could pass a string message as a warnign in GCC (but not as an ordinary message)?
Upvotes: 3
Views: 101
Reputation: 2713
You could use warning about usunused variable for this - http://www.ideone.com/GyAMq
if(1 < 0) {
char warning__1_Should_not_be_less_than_0;
}
Upvotes: 1
Reputation: 393709
(googled:)
#error
works and needs to, because the standard mandates it. gcc also has #warning
.
Upvotes: 6