Pascal Stumpf
2012-08-11 13:53:40 UTC
Hi,
pcc trunk fails to compile since the addition of -Wall -Werror to the
default CFLAGS. This is because -Wbounded (an OpenBSD addition)
complains about a memcpy:
gcc -g -O2 -Wall -Werror -Wmissing-prototypes -Wstrict-prototypes
-Wshadow -Wsign-compare -Wno-error=uninitialized -DGCC_COMPAT
-DPCC_DEBUG -D_ISOC99_SOURCE -Dos_openbsd -Dmach_amd64 -I. -I. -I../..
-I../../mip -I../../arch/amd64 -I../../os/openbsd -c -o builtins.o
./builtins.c
cc1: warnings being treated as errors
./builtins.c: In function 'builtin_nanx':
./builtins.c:599: warning: array size (12) smaller than bound length
(16)
./builtins.c:599: warning: array size (12) smaller than bound length
(16)
This is because PCC assumes a size of 12 bytes for a "long double" by
default, whereas sizeof() returns the true size (16). This is
apparently never checked, and LDBL_128 is never defined. It should be
easy to add an autoconf test for this though ...
pcc trunk fails to compile since the addition of -Wall -Werror to the
default CFLAGS. This is because -Wbounded (an OpenBSD addition)
complains about a memcpy:
gcc -g -O2 -Wall -Werror -Wmissing-prototypes -Wstrict-prototypes
-Wshadow -Wsign-compare -Wno-error=uninitialized -DGCC_COMPAT
-DPCC_DEBUG -D_ISOC99_SOURCE -Dos_openbsd -Dmach_amd64 -I. -I. -I../..
-I../../mip -I../../arch/amd64 -I../../os/openbsd -c -o builtins.o
./builtins.c
cc1: warnings being treated as errors
./builtins.c: In function 'builtin_nanx':
./builtins.c:599: warning: array size (12) smaller than bound length
(16)
./builtins.c:599: warning: array size (12) smaller than bound length
(16)
This is because PCC assumes a size of 12 bytes for a "long double" by
default, whereas sizeof() returns the true size (16). This is
apparently never checked, and LDBL_128 is never defined. It should be
easy to add an autoconf test for this though ...