GCC #pragma message ignored
16,682
If you read the correct documentation, you'll find that #pragma message
isn't supported in GCC 4.2.1.
Author by
rob05c
I'm a software developer with a B.S. in computer science. I currently work primarily with C++, C#, and occasionally Lua and Ruby.
Updated on June 27, 2022Comments
-
rob05c about 2 years
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 warningwarning: 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?
-
Micha Wiedenmann over 11 yearsIt is documented starting with version 4.4.7. It is not documented in version 4.3.6