Discussion:
Patch so gl_UNKNOWN_WARNINGS_ARE_ERRORS can be used with Objective C again
(too old to reply)
Eric Gallager
2018-02-18 06:18:29 UTC
Permalink
Previously I used to use the gl_WARN_ADD autoconf macro from gnulib to
test whether the compiler supports specific Objective C warning flags.
After recent gnulib changes to make gl_UNKNOWN_WARNINGS_ARE_ERRORS
language-specific, this broke. Attached is a patch to fix that. I'm
pretty sure I already have a copyright assignment on file for gnulib,
but if not, this patch should be trivial enough to apply anyways.

Thanks,
Eric Gallager

(P.S.: please cc me; I'm not subscribed to this list)
Bruno Haible
2018-02-18 14:46:50 UTC
Permalink
Hi Eric,
Post by Eric Gallager
Previously I used to use the gl_WARN_ADD autoconf macro from gnulib to
test whether the compiler supports specific Objective C warning flags.
After recent gnulib changes to make gl_UNKNOWN_WARNINGS_ARE_ERRORS
language-specific, this broke. Attached is a patch to fix that.
Thanks. Patch applied.
Post by Eric Gallager
I'm pretty sure I already have a copyright assignment on file for gnulib,
but if not, this patch should be trivial enough to apply anyways.
Indeed, the patch being nearly entirely a copy-and-paste of a block of code
a couple of lines ahead, it does not require a copyright assignment.

Do you also want to provide a 'build-aux/gobjc-warning.spec' file and
a 'm4/manywarnings-objc.m4' file? Or don't you use the 'manywarnings' module?

Bruno
Eric Gallager
2018-02-19 03:29:50 UTC
Permalink
Post by Bruno Haible
Hi Eric,
Post by Eric Gallager
Previously I used to use the gl_WARN_ADD autoconf macro from gnulib to
test whether the compiler supports specific Objective C warning flags.
After recent gnulib changes to make gl_UNKNOWN_WARNINGS_ARE_ERRORS
language-specific, this broke. Attached is a patch to fix that.
Thanks. Patch applied.
Post by Eric Gallager
I'm pretty sure I already have a copyright assignment on file for gnulib,
but if not, this patch should be trivial enough to apply anyways.
Indeed, the patch being nearly entirely a copy-and-paste of a block of code
a couple of lines ahead, it does not require a copyright assignment.
Do you also want to provide a 'build-aux/gobjc-warning.spec' file and
a 'm4/manywarnings-objc.m4' file? Or don't you use the 'manywarnings' module?
I use the manywarnings module for C, but there aren't really that many
objc-specific warnings (in gcc at least), at least not enough to have
made me want a manywarnings-objc... but I guess I could propose one
anyways. Besides the 2 files you suggested attaching, I also attached
a test configure.ac, but one issue with it is that it seems to call
gl_UNKNOWN_WARNINGS_ARE_ERRORS before every single gl_WARN_ADD call,
resulting in lots of unnecessary duplicated lines of:
checking whether Objective C compiler handles -Werror
-Wunknown-warning-option... (cached) no
in the output. It doesn't do that with just the plain C version. Any idea why?

Eric
Post by Bruno Haible
Bruno
Loading...