On 2020-08-05 10:58:29 -0700, Paul Eggert wrote:
> On 8/5/20 10:32 AM, Vincent Lefevre wrote:
> > With MPFR, it works after applying this patch.
> 
> I don't see it as working with MPFR. If you try to build MPFR 4.1.0 with
> "./configure CFLAGS='-g3 -O2 -Werror=old-style-definition'", then
> 'configure' makes some other wrong decisions on my platform (Fedora 31
> x86-64). For example, 'configure' doesn't "#define STDC_HEADERS 1" as it
> should,

Anyway, if it is defined, we remove its definition (like some
other macros defined by autoconf). One reason was a conflict
with GMP in some build cases (that was in 2005, and I don't
know whether this is still the case), and we don't use this
macro. In short, this is not an issue for us.

> and it creates the wrong value for global_symbol_pipe and for
> global_symbol_to_cdecl in the 'libtool' file.

Perhaps libtool should be fixed, then. But since our tests
don't break, we did not have the chance to notice that.

> Perhaps none of these mistakes happened to bite you in your tests, but the
> point is that it's always been a bad idea to use -Werror in 'configure', and
> saying that something doesn't work when one configures with -Werror is not a
> good motivation for making a change to Autoconf.

Then "configure" should provide a way to use -Werror, as this is
useful to detect non-portable constructs that are not protected with
conditional code (or incorrectly enabled). Note that filtering out
-Werror for configure is not OK as it would make configure tests give
unexpected results (e.g. meaning that some non-portable feature is
available while it is not when -Werror is used), leading to incorrect
conditional code being selected.

Note also that -Werror should be useful in configure tests. For
instance, there is/was a bug in a GMP configure test due to the
use of old style definitions there, where a long was passed to
a function while an unsigned int was expected.

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to