On Tue, Jun 11, 2024 at 12:50:16PM +0200, Bruno Haible wrote: > Patrice Dumas wrote: > > Thanks, should be fixed. > > Seems to help. Now, a different compilation error: > > libtool: compile: cc -DHAVE_CONFIG_H -I. -I../../../../tp/Texinfo/XS > -I../../../../tp/Texinfo/XS/main -I../../../../tp/Texinfo/XS/parsetexi > -I../../../../tp/Texinfo/XS -DDATADIR=\"/usr/local/share\" > -I../../../../tp/Texinfo/XS/gnulib/lib -I./gnulib/lib -I/Users/runner/include > -I/usr/local/opt/gettext/include -Wall -I/usr/local/include -MT > parsetexi/libtexinfo_la-debug_parser.lo -MD -MP -MF > parsetexi/.deps/libtexinfo_la-debug_parser.Tpo -c > ../../../../tp/Texinfo/XS/parsetexi/debug_parser.c -fno-common -DPIC -o > parsetexi/.libs/libtexinfo_la-debug_parser.o > ../../../../tp/Texinfo/XS/parsetexi/debug_parser.c:62:7: error: implicitly > declaring library function 'free' with type 'void (void *)' > [-Werror,-Wimplicit-function-declaration] > free (result); > ^ > ../../../../tp/Texinfo/XS/parsetexi/debug_parser.c:62:7: note: include the > header <stdlib.h> or explicitly provide a declaration for 'free' > 1 error generated. > make[5]: *** [parsetexi/libtexinfo_la-debug_parser.lo] Error 1 > > Btw, this is not platform-dependent code. You should see warnings about > such missing #include statements, if you compile with "gcc -Wall" on systems > with glibc.
That would be great, but I do not get such warning even wiht -Wall. What I usually use as CFLAGS is -g -Wformat-security -Wall -Wno-parentheses -Wno-missing-braces We get a lot of false positive with -Wparentheses and -Wmissing-braces (though occasionally some true errors...). > More about best practices for gcc warnings in the Gnulib manual: > https://www.gnu.org/software/gnulib/manual/html_node/manywarnings.html I tried to add more warnings from the gnulib m4/manywarnings.m4 but I did not get anything on missing stdlib.h. -- Pat
