Re: manywarnings for C++

2017-08-07 Thread Reuben Thomas
On 7 August 2017 at 21:09, Bruno Haible wrote: > Reuben Thomas wrote: > > ​Thanks, that seems to fix it.​ > > Good! So, I've pushed it. > ​Thanks very much, that means I'm down to only one gnulib diff in Enchant, which adds extra project-specific instructions to INSTALL. -- https://rrt.sc3d.or

Re: manywarnings for C++

2017-08-07 Thread Bruno Haible
Reuben Thomas wrote: > ​Thanks, that seems to fix it.​ Good! So, I've pushed it. Bruno

Re: manywarnings for C++

2017-08-07 Thread Reuben Thomas
On 7 August 2017 at 18:12, Bruno Haible wrote: > Reuben Thomas wrote: > > ​OK, now that some of the code is in a new file, I get: > > > > configure.ac:90: error: gl_MANYWARN_ALL_GCC: unknown language: C++ > > m4/manywarnings.m4:38: gl_MANYWARN_ALL_GCC is expanded from... > > configure.ac:90: the

Re: manywarnings for C++

2017-08-07 Thread Bruno Haible
Reuben Thomas wrote: > ​OK, now that some of the code is in a new file, I get: > > configure.ac:90: error: gl_MANYWARN_ALL_GCC: unknown language: C++ > m4/manywarnings.m4:38: gl_MANYWARN_ALL_GCC is expanded from... > configure.ac:90: the top level Ah, 'aclocal' does not grok that it needs to incl

Re: manywarnings for C++

2017-08-07 Thread Reuben Thomas
On 7 August 2017 at 17:21, Reuben Thomas wrote: > On 7 August 2017 at 17:16, Reuben Thomas wrote: > >> On 7 August 2017 at 17:11, Reuben Thomas wrote: >> >>> On 7 August 2017 at 16:42, Bruno Haible wrote: >>> > Currently in my configure.ac, I have: > > AC_LANG_PUSH([C++])

Re: manywarnings for C++

2017-08-07 Thread Reuben Thomas
On 7 August 2017 at 17:16, Reuben Thomas wrote: > On 7 August 2017 at 17:11, Reuben Thomas wrote: > >> On 7 August 2017 at 16:42, Bruno Haible wrote: >> >>> >>> > Currently in my configure.ac, I have: >>> > >>> > AC_LANG_PUSH([C++]) >>> > gl_MANYWARN_ALL_GCC([cxx_warnings]) >>> > >>> > dn

Re: manywarnings for C++

2017-08-07 Thread Reuben Thomas
On 7 August 2017 at 17:11, Reuben Thomas wrote: > On 7 August 2017 at 16:42, Bruno Haible wrote: > >> >> > 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

Re: manywarnings for C++

2017-08-07 Thread Reuben Thomas
On 7 August 2017 at 16:42, Bruno Haible wrote: > > > 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

Re: manywarnings for C++

2017-08-07 Thread Bruno Haible
Hi Reuben, > ​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). OK, then if we find that some warnings

Re: manywarnings for C++

2017-08-07 Thread Eric Blake
On 08/07/2017 10:14 AM, Reuben Thomas wrote: > On 7 August 2017 at 16:12, Bruno Haible wrote: > >> Reuben Thomas wrote: >>> the ability to AC_DEFUN a >>> macro with a particular argument, as in:​ >>> >>> ​AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)],​ >>> >>> so that it is possible to AC_REQUIRE

Re: manywarnings for C++

2017-08-07 Thread Bruno Haible
Reuben Thomas wrote: > the ability to AC_DEFUN a > macro with a particular argument, as in:​ > > ​AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)],​ > > so that it is possible to AC_REQUIRE such a macro. The '(C)' part is not an argument to the function. It's part of the function name. By convention

Re: manywarnings for C++

2017-08-07 Thread Reuben Thomas
On 7 August 2017 at 16:12, Bruno Haible wrote: > Reuben Thomas wrote: > > the ability to AC_DEFUN a > > macro with a particular argument, as in:​ > > > > ​AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)],​ > > > > so that it is possible to AC_REQUIRE such a macro. > > The '(C)' part is not an argumen

Re: manywarnings for C++

2017-08-07 Thread Reuben Thomas
On 6 August 2017 at 23:50, Bruno Haible 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.

Re: manywarnings for C++

2017-08-07 Thread Reuben Thomas
On 6 August 2017 at 23:50, Bruno Haible wrote: > Hi Reuben, > > > For reference, these versions do not address this request from Bruno: > > I've now addressed this issue. I hope you'll find the new code structure > more systematic. > ​Thanks very much for this. The main feature of the code which

Re: manywarnings for C++

2017-08-06 Thread Bruno Haible
Hi Reuben, > For reference, these versions do not address this request from Bruno: I've now addressed this issue. I hope you'll find the new code structure more systematic. Here's how I see the status / needed tweaks on your patches: - warnings.m4: No change needed any more. - manywarnings.m

Re: manywarnings for C++

2017-08-06 Thread Bruno Haible
I wrote on 2017-02-17: > 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

Re: manywarnings for C++

2017-08-05 Thread Paul Eggert
Thanks, as I try to avoid C++ I hope Bruno has the time to review that one.

Re: manywarnings for C++

2017-08-05 Thread Reuben Thomas
On 7 March 2017 at 12:20, Reuben Thomas wrote: > On 22 February 2017 at 13:55, Reuben Thomas 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

Re: manywarnings for C++

2017-03-07 Thread Reuben Thomas
On 22 February 2017 at 13:55, Reuben Thomas 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 appli

Re: manywarnings for C++

2017-02-22 Thread Reuben Thomas
On 21 February 2017 at 14:58, Bruno Haible wrote: > Hi Reuben, > > This looks reasonable: Since a project can use both gcc and g++ and since > the > desired warning options for gcc and g++ are likely different, it's good to > have different macros, that set different variables (WARN_CFLAGS vs. >

Re: manywarnings for C++

2017-02-21 Thread Reuben Thomas
On 21 February 2017 at 15:05, Bruno Haible wrote: > Hi Reuben, > > > ​For example, would it be sensible to have a single spec file, with each > > row as follows: > > > > warning language-list comment > > > > i.e. the first and third columns as at present, and the second giving the > > languages f

Re: manywarnings for C++

2017-02-21 Thread Bruno Haible
Hi Reuben, > ​For example, would it be sensible to have a single spec file, with each > row as follows: > > warning language-list comment > > i.e. the first and third columns as at present, and the second giving the > languages for which the flag is used? In my opinion 1) How to specify the se

Re: manywarnings for C++

2017-02-21 Thread Bruno Haible
Hi Reuben, This looks reasonable: Since a project can use both gcc and g++ and since the desired warning options for gcc and g++ are likely different, it's good to have different macros, that set different variables (WARN_CFLAGS vs. WARN_CXXFLAGS). > I'd be happy to work this up into a patch give

Re: manywarnings for C++

2017-02-21 Thread Reuben Thomas
On 21 February 2017 at 12:13, Reuben Thomas wrote: > I needed this recently, so I made it. I have not attempted to refactor the > code, as there seem to be multiple sensible-seeming ways to do this; I > attach a simple duplication of the manywarnings files, reconfigured for C++. > > I'd be happy