Re: [eigen] Disable variadic macro warning when compiling at full warning level.

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


OK, so:

first of all, it's not

>  #pragma GCC diagnostic ignored "-Wno-variadic-macros"

but rather:

#pragma GCC diagnostic ignored "-Wvariadic-macros"

And now there's a big problem with GCC. The above line only ignores
-Wvariadic-macros when it's passed on the command line. But when it's
implied by -pedantic, it doesn't get ignored.

I don't know if there's a way to let this warning be ignored in pedantic mode?

Unless there is, your patch is then the next best thing!

Benoit

2010/1/29 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> I tried, but was not able to do so.
>
> I tried the following pragma directive
>
>  #pragma GCC diagnostic ignored "-Wno-variadic-macros"
>
> but the compiler did not accept it and gave me warnings about it.
> Maybe you are right and I should backout the commit.
>
> What bothers me is that CTest/CDash has a warning limit of 50 and with
> EIGEN_TEST_MAX_WARNING_LEVEL enabled the warnings regarding the
> variadic macros are hiding potentially interesting ones.
>
> Maybe somebody else has an idea and maybe I am using the GCC pragma
> the wrong way.
>
> - Hauke
>
> On Fri, Jan 29, 2010 at 12:45 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> I don't understand this commit. It has the effect of hiding a warning
>> from us when we build the unit tests, but it won't hide the warning
>> from our users when they build their own application using Eigen.
>> Hence we're going to get users confused about this warning, right?
>>
>> If you need this warning disabled, we need to disable and re-enable it
>> with pragmas in eigen itself.
>>
>> 2010/1/29  <commits-noreply@xxxxxxxxxxxxx>:
>>> 1 new changeset in eigen:
>>>
>>> http://www.bitbucket.org/eigen/eigen/changeset/e827151721cb/
>>> changeset:   r2403:e827151721cb
>>> user:        hauke
>>> date:        2010-01-29 09:53:19
>>> summary:     Disable variadic macro warning when compiling at full warning level.
>>> I was not able to get a macro version running and thus I opted for a cmake patch.
>>> affected #:  1 file (230 bytes)
>>>
>>> Repository URL: http://bitbucket.org/eigen/eigen/
>
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/