rob05c
rob05c

Reputation: 1233

GCC #pragma message ignored

I am trying to display a compile-time message in GCC, via

#pragma message "hello world"

But when I compile with -Wall it gives the warning

warning: ignoring #pragma message 

I'm using GCC 4.2.1 on Mac OS X 10.6.8 (Snow Leopard).

Why isn't it displaying the message? How can I make it display the message?

Upvotes: 11

Views: 20755

Answers (1)

Carl Norum
Carl Norum

Reputation: 225162

If you read the correct documentation, you'll find that #pragma message isn't supported in GCC 4.2.1.

Upvotes: 16

Related Questions