[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_CHECK_FUNCS and gcc with -Werror
From: |
Eric Blake |
Subject: |
Re: AC_CHECK_FUNCS and gcc with -Werror |
Date: |
Wed, 03 Mar 2010 05:47:27 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
According to Ralf Corsepius on 3/3/2010 4:04 AM:
> On 03/03/2010 11:52 AM, Steffen Dettmer wrote:
>> Hi,
>>
>> in configure.in I have:
>>
>> AC_CHECK_FUNCS(printf)
C89 guarantees the existence of printf - this particular use of
AC_CHECK_FUNCS is most likely unnecessary for any modern machine, unless
your goal is to port to an embedded system that doesn't provide all of C89.
>> cc1: warnings being treated as errors
>> conftest.c:67: warning: conflicting types for built-in function 'printf'
>>
>> what to do best here?
> Not using -Werror
That's been the standard advice for years now. Don't do something if it
hurts. -Werror is a can of worms - there is NO way to silence all
possible warnings for all possible compilers. It's great on a
per-compiler build (for example, coreutils provides --enable-gcc-warnings,
which conditionally adds -Werror to CFLAGS if the compiler spuports it),
but only for the program itself, and not for the duration of the configure
run.
Meanwhile, there is a patch on the table to teach autoconf 2.66 how to
recognize and work around -Werror coupled with gcc; I hope to finish
reviewing and apply it soon.
http://lists.gnu.org/archive/html/bug-autoconf/2010-02/msg00040.html
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Ralf Corsepius, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror,
Eric Blake <=
- Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Eric Blake, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Ralf Corsepius, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Peter Breitenlohner, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Russ Allbery, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Russ Allbery, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/04
- Re: AC_CHECK_FUNCS and gcc with -Werror, Russ Allbery, 2010/03/04