Re: [eigen] Disable variadic macro warning when compiling at full warning level. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Disable variadic macro warning when compiling at full warning level.
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 29 Jan 2010 07:51:39 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=734k+yyrNmBIeUnPKOLmmSUv0G+umEeWMrQtId6h5Dk=; b=hoAjah9s5KUlffvawldfHZGhxN27S0uUL8N7zfssXF+6vXbrdCim2Er/PvJwfrWgo5 OOL+Ui43ZylBEGDESwbk0qhCiYuD5wn5sG3zNFg6TbrrDwbRm++c7VrzvldzWHzfphnS mwR/KwnC3mBKGrumCQNBaksko344S/yH+N3Pw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=LEaShi0M/XDP6OiSwRSpE3m4yuvA63fbJSDIYlJl/fn0AoQ0SslaWPfh21EqXMCohp a7eIlyhOkomvOFBEOo0YUdtGiSliUUFwcczAhbGdGKuzvJpCFYq1J2GIqCfMBaVGGASY Uyi8M0Mg7s659BB32sCiLN1S6iyveU6AufVm4=
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/
>
>
>