Trying to find a way to disable pragma warnings
Jacob Brown
god@doesnotexist.com
Wed Sep 2 02:13:00 GMT 2009
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
Thanks for "-Wno-unknown-pragmas". That seemed to work.
I would prefer the #pragma method, since if that worked, I wouldn't
have to re-modify my Makefiles everytime I rebuild my package.
I guess I'm glad the #pragma works for you... not sure why it won't
work for me :(
Thanks!
On Tue, Sep 1, 2009 at 6:38 PM, Ian Lance Taylor<iant@google.com> wrote:
> Jacob Brown <god@doesnotexist.com> writes:
>
>> I'm compile a project that uses -Wall, and it has a lot of warnings
>>>From #pragmas caused by -Wunknown-pragmas. So I've tried to disable
>> this by adding the pragama,
>> #pragma GCC diagnostic ignored "-Wunknown-pragmas"
>> This doesn't seem to work. I've also tried adding -Wno-pragmas both
>> before and after -Wall on the command line CXX flags.
>
> The #pragma works for me. What version of gcc are you using?
>
> On the command line you probably want to use -Wno-unknown-pragmas.
>
> Ian
>
More information about the Gcc-help
mailing list