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: Mon, 7 Aug 2017 13:21:44 +0100

On 6 August 2017 at 23:50, Bruno Haible <address@hidden> wrote:
  - g++-warning.spec: Looks OK to me. I trust that your C++ experience is
    fresher than mine (I learned C++ in 1997).

​I simply went through the GCC manual and gcc-warning.spec and added in C++ warnings and removed those which were C only. I'm working with C++ in Enchant at present, but I can't say I'm well up on modern C++ (or indeed any other flavour).

I attach an updated patch against manywarnings.m4, and, for simplicity, the same g++-warning.spec.

There's one issue left that I'm aware of: the recipe in the comments of the C and C++ flavors of gl_MANYWARN_ALL_GCC for comparing the *.spec list of warnings with one's own compiler no longer works, since it will grep all the warnings for all languages defined in manywarnings.m4. I'm unsure how best to fix this.

Currently in my configure.ac, I have:

  AC_LANG_PUSH([C++])
  gl_MANYWARN_ALL_GCC([cxx_warnings])

  dnl Enable all G++ warnings not in this list.
  gl_MANYWARN_COMPLEMENT([cxx_warnings], [$cxx_warnings], [$nw])
  for w in $cxx_warnings; do
    gl_WARN_ADD([$w])
  done
  AC_LANG_POP

which seems to work. However, it seems I should be able to call gl_MANYWARN_ALL_GCC(C++) directly; but where then do I put the argument giving the variable in which to put the warnings? I'm confused by the apparent argument in the name of the macro!

I guess this explains why gl_MANYWARN_ALL_GCC({C,C++}) still contain AC_LANG_PUSH/POP pairs, as they can in fact be called directly?

--

Attachment: manywarnings.m4.diff
Description: Text document

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


reply via email to

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