[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
msys/mingw warnings about string length and putenv absence with gcc -Wal
From: |
Chris Pickett |
Subject: |
msys/mingw warnings about string length and putenv absence with gcc -Wall -ansi |
Date: |
Tue, 30 Dec 2008 02:33:40 -0500 |
User-agent: |
Thunderbird 1.5.0.14 (Macintosh/20071210) |
Hi,
If I compile my project on MSYS/MinGW with gcc -Wall -ansi (plus other
warning stuff that shouldn't matter here) I get two unexpected warnings.
Problem 1 is string lengths that are too long, problem 2 is a missing
putenv declaration. Based on a previous bug report, it seems the string
lengths were fixed already for C99's more generous limit, so presumably
a C89 fix can follow the same process. As for putenv, it exists on
mingw but -ansi hides it, so maybe some use of #if !HAVE_DECL_PUTENV and
a declaration somewhere can fix it (this works in my own project).
gcc -DHAVE_CONFIG_H -I. -I.. -I../src -g -O2 -Wall -ansi -pedantic
-Wextra -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -MT
ex_log_output.o -MD -MP -MF .deps/ex_log_output.Tpo -c -o
ex_log_output.o ex_log_output.c
In file included from ex_log_output.c:6:
../src/check.h:211:27: warning: anonymous variadic macros were
introduced in C99
../src/check.h:222:23: warning: anonymous variadic macros were
introduced in C99
../src/check.h:227:14: warning: anonymous variadic macros were
introduced in C99
mv -f .deps/ex_log_output.Tpo .deps/ex_log_output.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -Wall -ansi
-pedantic -Wextra -Wstrict-prototypes -Wmissing-prototypes
-Wwrite-strings -o ex_log_output.exe ex_log_output.o
../src/libcheck.la ../lib/libcompat.la
libtool: link: gcc -g -O2 -Wall -ansi -pedantic -Wextra
-Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -o
.libs/ex_log_output.exe ex_log_output.o ../src/.libs/libcheck.dll.a
../lib/.libs/libcompat.a -L/usr/local/lib
./.libs/lt-ex_log_output.c:229: warning: string length `2671' is greater
than the length `509' ISO C89 compilers are required to support
./.libs/lt-ex_log_output.c:285: warning: string length `1565' is greater
than the length `509' ISO C89 compilers are required to support
./.libs/lt-ex_log_output.c: In function `lt_setenv':
./.libs/lt-ex_log_output.c:783: warning: implicit declaration of
function `putenv'
Cheers,
Chris
P.S. The anonymous variadic macros warning is something I cannot turn
off with gcc-3.4.5, the current mingw compiler.
P.P.S. Thanks Autotools people for bearing with me as I port something
to Windows for the first time.
- msys/mingw warnings about string length and putenv absence with gcc -Wall -ansi,
Chris Pickett <=
- Re: msys/mingw warnings about string length and putenv absence with gcc -Wall -ansi, Bob Friesenhahn, 2008/12/30
- Re: msys/mingw warnings about string length and putenv absence with gcc -Wall -ansi, Charles Wilson, 2008/12/30
- Re: msys/mingw warnings about string length and putenv absence with gcc -Wall -ansi, Bob Friesenhahn, 2008/12/30
- Re: msys/mingw warnings about string length and putenv absence with gcc -Wall -ansi, Roumen Petrov, 2008/12/30
- Re: msys/mingw warnings about string length and putenv absence with gcc -Wall -ansi, Chris Pickett, 2008/12/30
- Re: msys/mingw warnings about string length and putenv absence with gcc -Wall -ansi, Chris Pickett, 2008/12/30
- Re: msys/mingw warnings about string length and putenv absence with gcc -Wall -ansi, Charles Wilson, 2008/12/30
- Re: msys/mingw warnings about string length and putenv absence with gcc -Wall -ansi, Roumen Petrov, 2008/12/30
- Re: msys/mingw warnings about string length and putenv absence with gcc -Wall -ansi, Roumen Petrov, 2008/12/30