|
From: | Reuben Thomas |
Subject: | Re: manywarnings for C++ |
Date: | Sat, 5 Aug 2017 18:19:38 +0100 |
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!
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 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…
manywarnings.m4.diff
Description: Text document
g++-warning.spec
Description: Text Data
warnings.m4.diff
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |