Re: syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-20 Thread Bruno Haible
Collin Funk wrote: > > The full list of header files for which #include "..." is to be avoided is: > > > > alloca.h > > arpa_inet.h > > assert.h > > I saw that arpa_inet.h had an underscore instead of a slash in this > message but forgot to fix it when I pasted it into the Makefile... There were

Re: syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-20 Thread Collin Funk
On 2/18/24 4:44 AM, Bruno Haible wrote: > The full list of header files for which #include "..." is to be avoided is: > > alloca.h > arpa_inet.h > assert.h I saw that arpa_inet.h had an underscore instead of a slash in this message but forgot to fix it when I pasted it into the Makefile... Sorry

Re: syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-20 Thread Bruno Haible
Simon Josefsson wrote: > There are some checks that I struggle to understand the point of, > and one that I simply disagree with (sc_prohibit_strcmp). Likewise for me. [1] > Having a link > to discussion helps to determine how to deal with errors. > > What do you think about: > >1) using a

Re: syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-19 Thread Jim Meyering
On Mon, Feb 19, 2024 at 12:45 AM Simon Josefsson wrote: > Bruno Haible writes: > > --- a/top/maint.mk > > +++ b/top/maint.mk > > @@ -503,6 +503,7 @@ sc_prohibit_have_config_h: > > # Nearly all .c files must include . However, we also permit > > this > > # via inclusion of a package-specific h

Re: syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-19 Thread Jim Meyering
On Mon, Feb 19, 2024 at 10:11 AM Collin Funk wrote: > Jim Meyering writes: > > Thank you both. I've just pushed an improvement. > > The new version runs grep only once rather than many times, and seems > > simpler. > > Thanks. This one seems much better. It also returns 1 if an invalid > quoted

Re: syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-19 Thread Collin Funk
Jim Meyering writes: > Thank you both. I've just pushed an improvement. > The new version runs grep only once rather than many times, and seems simpler. Thanks. This one seems much better. It also returns 1 if an invalid quoted header is found which I forgot to do. This Makefile would probably be

Re: syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-19 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: > --- a/top/maint.mk > +++ b/top/maint.mk > @@ -503,6 +503,7 @@ sc_prohibit_have_config_h: > # Nearly all .c files must include . However, we also permit this > # via inclusion of a package-specific header, if cfg.mk specified one. > # config_h_header must be suitable for

Re: syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-18 Thread Jim Meyering
On Sun, Feb 18, 2024 at 12:33 PM Bruno Haible wrote: > Collin Funk wrote: > > I attached a patch that seems to work alright. I'm not the greatest with > > GNU Make so it isn't very pretty. Feel free to modify it as much as you > > would like. > > > > Here is some sample output from Coreutils. On

Re: syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-18 Thread Bruno Haible
Collin Funk wrote: > I attached a patch that seems to work alright. I'm not the greatest with GNU > Make so it isn't very pretty. Feel free to modify it as much as you would > like. > > Here is some sample output from Coreutils. One or two are real so I'll submit > a patch there. > > [collin@d

Re: syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-18 Thread Collin Funk
On 2/18/24 4:44 AM, Bruno Haible wrote: > Does anyone want to contribute a syntax-check rule (in maint.mk) for this? I attached a patch that seems to work alright. I'm not the greatest with GNU Make so it isn't very pretty. Feel free to modify it as much as you would like. Here is some sample ou

syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-18 Thread Bruno Haible
Does anyone want to contribute a syntax-check rule (in maint.mk) for this? The full list of header files for which #include "..." is to be avoided is: alloca.h arpa_inet.h assert.h ctype.h dirent.h errno.h error.h fcntl.h fenv.h float.h fnmatch.h getopt.h glob.h iconv.h inttypes.h langinfo.h limi