Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCC #pragma message ignored

Tags:

c++

c

gcc

pragma

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?

like image 877
rob05c Avatar asked Mar 14 '12 02:03

rob05c


1 Answers

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

like image 161
Carl Norum Avatar answered Sep 21 '22 15:09

Carl Norum