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... > >

Re: Feature Request: Implement glibc reallocarray() function

2017-08-07 Thread Paul Eggert
Bruno Haible wrote: You can start out by looking at the implementation of module 'strsep' Another suggestion: Gnulib reallocarray should use Gnulib's xalloc_oversized macro instead of the glibc check_mul_overflow_size_t function. See the xalloc-oversized module.

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 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. --

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

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

Feature Request: Implement glibc reallocarray() function

2017-08-07 Thread Darshit Shah
Hi, Glibc 2.26 introduced the reallocarray() function which acts as a safe realloc counterpart to calloc(). I'd like to use this in GNU Wget but since it is not easily available on all systems, I guess we should have an implementation in gnulib. If others here agree, I'd like to see this

Re: [PATCH] git-version-gen: Fix for tags containing '-'

2017-08-07 Thread Markus Armbruster
Paul Eggert writes: > Markus Armbruster wrote: >> Should we replace /-([^-]+)-g([^-]*)$/ by /.\1-\2/? Extended regexp >> for clarity. Tighter matching would be possible, say >> /-([0-9]+)-g[0-9a-f]{4,}$/. > > Sounds good, I installed the attached. Works for me, thanks!

Re: [PATCH] git-version-gen: Fix for tags containing '-'

2017-08-07 Thread Paul Eggert
Markus Armbruster wrote: Should we replace /-([^-]+)-g([^-]*)$/ by /.\1-\2/? Extended regexp for clarity. Tighter matching would be possible, say /-([0-9]+)-g[0-9a-f]{4,}$/. Sounds good, I installed the attached. >From 45a1331864ed37db2cd058a99eb9934648d4c342 Mon Sep 17 00:00:00 2001 From:

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 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

Re: Feature Request: Implement glibc reallocarray() function

2017-08-07 Thread Bruno Haible
Hi Darshit, > Glibc 2.26 introduced the reallocarray() function which acts as a safe > realloc counterpart to calloc(). ... If others here agree, I'd like to see > this > function within in gnulib. Yes, a portable replacement of this function belongs in gnulib. It falls both in the categories

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

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

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],

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++]) >>> >

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

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

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