[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: -Werror breaks autoconf tests, but not actual source code
From: |
Millaway, John |
Subject: |
RE: -Werror breaks autoconf tests, but not actual source code |
Date: |
Wed, 10 Dec 2003 20:33:10 -0500 |
> > This will break due to various autoconf tests in the
> configure script:
> >
> > CFLAGS='-Werror' ./configure
>
> In what way does it break? Can you give a specific example?
One of them is AC_HEADER_STDC, which gets a warning for implicit declaration
of 'exit':
configure:6851: checking for ANSI C header files
configure:6876: gcc -c -Wall -g -Werror conftest.c >&5
configure:6882: $? = 0
configure:6886: test -z
|| test ! -s conftest.err
configure:6889: $? = 0
configure:6892: test -s conftest.o
configure:6895: $? = 0
configure:6981: gcc -o conftest -Wall -g -Werror conftest.c -lm >&5
cc1: warnings being treated as errors
conftest.c: In function `main':
conftest.c:33: warning: implicit declaration of function `exit'
configure:6984: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "flex"
| #define PACKAGE_TARNAME "flex"
| #define PACKAGE_VERSION "2.5.31"
| #define PACKAGE_STRING "flex 2.5.31"
| #define PACKAGE_BUGREPORT "address@hidden"
| #define PACKAGE "flex"
| #define VERSION "2.5.31"
| #ifdef __cplusplus
| extern "C" void std::exit (int) throw (); using std::exit;
| #endif
| #define M4 "/usr/local/bin/gm4"
| #define HAVE_LIBM 1
| /* end confdefs.h. */
| #include <ctype.h>
| #if ((' ' & 0x0FF) == 0x020)
| # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
| # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
| #else
| # define ISLOWER(c) (('a' <= (c) && (c) <= 'i')
|| ('j' <= (c) && (c) <= 'r') || ('s' <= (c) && (c) <= 'z'))
| # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
| #endif
|
| #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
| int
| main ()
| {
| int i;
| for (i = 0; i < 256; i++)
| if (XOR (islower (i), ISLOWER (i))
| || toupper (i) != TOUPPER (i))
| exit(2);
| exit (0);
| }
configure:7004: result: no
- -Werror breaks autoconf tests, but not actual source code, Millaway, John, 2003/12/10
- RE: -Werror breaks autoconf tests, but not actual source code,
Millaway, John <=
- RE: -Werror breaks autoconf tests, but not actual source code, Millaway, John, 2003/12/11
- RE: -Werror breaks autoconf tests, but not actual source code, Millaway, John, 2003/12/11
- RE: -Werror breaks autoconf tests, but not actual source code, Millaway, John, 2003/12/11
- RE: -Werror breaks autoconf tests, but not actual source code, Millaway, John, 2003/12/11