bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: manywarnings for C++


From: Reuben Thomas
Subject: Re: manywarnings for C++
Date: Sat, 5 Aug 2017 18:19:38 +0100

On 7 March 2017 at 12:20, Reuben Thomas <address@hidden> wrote:
On 22 February 2017 at 13:55, Reuben Thomas <address@hidden> wrote:

​I attach the latest state of play, which consists simply of updated versions of manywarnings.m4 and warnings.m4, in place of the new files I had before. (To test them I have simply placed them in a gnulib patch directory which is applied by bootstrap; I love how simple it is!)

​Ping!

​Ping!! Attached, the latest version of my patches (in fact they've not changed since last time, but there is an extra file I forgot to include before), and now I attach patches to existing files as such rather than as complete files.

For reference, these versions do not address this request from Bruno:

Please also fix the AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS]) invocation in gl_WARN_ADD and gl_CXX_WARN_ADD. Since this macro expands to different code after AC_LANG_PUSH([C++]) than after AC_LANG_PUSH([C]), it is wrong to just AC_REQUIRE it. Needs to be a bit more intelligent.

Look at how _AC_LANG_ABBREV and _AC_LANG_PREFIX can be used. Maybe libtool.m4, which also plays around with AC_LANG, gives you some hint about this.

​I previously replied:​

I didn't fully understand this bit. I see that _AC_LANG_ABBREV/_AC_LANG_PREFIX are used to inject the name of the language into the names of variables. I see that gl_UNKNOWN_WARNINGS_ARE_ERRORS changes depending on the language because gl_COMPILER_OPTION_IF changes. (By the way, can we now assume autoconf 2.64 (of July 2009) or newer and hence quote gl_Warn, as per the comment, there?)
Since gl_UNKNOWN_WARNINGS_ARE_ERRORS is therefore language-dependent, that makes me think it needs to be called, not AC_REQUIREd, by gl_{CXX_,}_WARN_ADD (because the language might change each time), but if it were that simple, you'd've said so. So I'm not sure what else is needed…

--

Attachment: manywarnings.m4.diff
Description: Text document

Attachment: g++-warning.spec
Description: Text Data

Attachment: warnings.m4.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]