Bug 18989

Summary: A few potentially ominous, and several likely harmless warnings during 4.0 build
Product: gcc Reporter: Paul Schlie <schlie>
Component: targetAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED WONTFIX    
Severity: normal CC: eric.weddington, gcc-bugs, gjl
Priority: P5    
Version: 4.0.0   
Target Milestone: ---   
Host: powerpc-apple-darwin7.6.0 Target: avr-unknown-none
Build: powerpc-apple-darwin7.6.0 Known to work:
Known to fail: Last reconfirmed: 2004-12-14 16:51:18

Description Paul Schlie 2004-12-14 16:45:30 UTC
Warnings generated during a failed avr target build of 4.0 as of today, on a mac/dwawin-7.6 host 
which should likely be verified as being harmless, and then silenced if so. (sending the report just in 
case the build failure may be related to one of the more ominous warnings, and for reference: built via
../gcc/configure --target=avr --disable-nls --enable-languages=c )

[ other more target specific warnings/errors noted via PR:18988, and noted at the end ]

--- don't know where the below should have been defined, but seems fragile?:

gcc   -g -O2  -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-
prototypes  -fno-common   -DHAVE_CONFIG_H -DGENERATOR_FILE  -o build/gengtype \
 build/gengtype.o build/gengtype-lex.o build/gengtype-yacc.o \
 build/errors.o ../build-powerpc-apple-darwin7.6.0/libiberty/libiberty.a
build/gengtype
warning: structure `c_arg_info' used but not defined
warning: structure `c_switch' used but not defined
warning: structure `reorder_block_def' used but not defined
warning: structure `et_node' used but not defined
warning: structure `loop' used but not defined
warning: structure `reg_info_def' used but not defined
warning: structure `value_set' used but not defined
warning: structure `alias_var_def' used but not defined
warning: structure `c_arg_info' used but not defined
warning: structure `c_switch' used but not defined
warning: structure `reorder_block_def' used but not defined
warning: structure `et_node' used but not defined
warning: structure `loop' used but not defined
warning: structure `reg_info_def' used but not defined
warning: structure `value_set' used but not defined
warning: structure `alias_var_def' used but not defined
echo timestamp > s-gtype

--- the last two warnings below imply something's fragile?:

gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/macro.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/macro.c:27:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
../../gcc/libcpp/macro.c: In function `padding_token':
../../gcc/libcpp/macro.c:913: warning: assignment discards qualifiers from pointer target type
../../gcc/libcpp/macro.c: In function `create_iso_definition':
../../gcc/libcpp/macro.c:1422: warning: assignment from incompatible pointer type

--- likely not a big deal, but would be nicer if verified/silenced:

gcc -c   -g -O2  -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes  -fno-common -Wno-error  -DHAVE_CONFIG_H -DGENERATOR_FILE    -I. 
-Ibuild -I../../gcc/gcc -I../../gcc/gcc/build -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include  
\
 -o build/gengtype-yacc.o gengtype-yacc.c
/usr/share/bison.simple: In function `yyparse':
/usr/share/bison.simple:614: warning: comparison between signed and unsigned
/usr/share/bison.simple:626: warning: comparison between signed and unsigned

--- not a big deal, but would be nicer if prototypes were added to silence:

gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/charset.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/charset.c:22:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/directives.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/directives.c:23:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/errors.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/errors.c:27:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/expr.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/expr.c:22:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/files.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/files.c:25:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/identifiers.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/identifiers.c:27:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
echo "#define LOCALEDIR \"/usr/local/share/locale\"" > localedir.new
../../gcc/libcpp/../move-if-change localedir.new localedir.h
echo timestamp > localedir.hs
gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/init.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/init.c:23:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/lex.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/lex.c:23:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/line-map.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/line-map.c:24:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/mkdeps.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/mkdeps.c:24:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/pch.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/pch.c:19:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
../../gcc/libcpp/pch.c: In function `cpp_read_state':
../../gcc/libcpp/pch.c:656: warning: pointer targets in passing arg 1 of `strcspn' differ in signedness
gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/symtab.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/symtab.c:23:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/traditional.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/traditional.c:20:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
rm -f libcpp.a
ar cru libcpp.a charset.o directives.o errors.o expr.o files.o identifiers.o init.o lex.o line-map.o macro.o 
mkdeps.o pch.o symtab.o traditional.o
ranlib libcpp.a
gcc  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -g -O2  -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -I../../gcc/
libcpp -I. -I../../gcc/libcpp/../include -I../../gcc/libcpp/include  -c ../../gcc/libcpp/makedepend.c
In file included from ../../gcc/libcpp/system.h:269,
                 from ../../gcc/libcpp/makedepend.c:24:
../../gcc/include/libiberty.h:80: warning: function declaration isn't a prototype
In file included from ../../gcc/libcpp/makedepend.c:27:
../../gcc/include/getopt.h:116: warning: function declaration isn't a prototype

---

In addition to general hopefully benign warrnings reported via another PR, these
seem more target specific than not, and may have contributed to the failure?:

--- would seem that the code in varasm.c may be broken/fragile?:

gcc -c   -g -O2  -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes  -fno-common   -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include  ../../gcc/gcc/varasm.c -o varasm.o
../../gcc/gcc/varasm.c: In function `assemble_variable':
../../gcc/gcc/varasm.c:1699: warning: empty body in an if-statement
../../gcc/gcc/varasm.c: In function `const_rtx_hash_1':
../../gcc/gcc/varasm.c:2843: warning: right shift count >= width of type

--- wouldn't expect a long double type to be referanced if not required by the target?

gcc -c   -g -O2  -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes  -fno-common   -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include  ../../gcc/gcc/alloc-pool.c -o alloc-pool.o
../../gcc/gcc/alloc-pool.c:48: warning: use of `long double' type; its size may change in a future 
release
../../gcc/gcc/alloc-pool.c:48: warning: (Long double usage is reported only once for each file.
../../gcc/gcc/alloc-pool.c:48: warning: To disable this warning, use -Wno-long-double.)

gcc -c   -g -O2  -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes  -fno-common   -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include  ../../gcc/gcc/ggc-page.c -o ggc-page.o
../../gcc/gcc/ggc-page.c:208: warning: use of `long double' type; its size may change in a future 
release
../../gcc/gcc/ggc-page.c:208: warning: (Long double usage is reported only once for each file.
../../gcc/gcc/ggc-page.c:208: warning: To disable this warning, use -Wno-long-double.)
Comment 1 Andrew Pinski 2004-12-14 16:51:17 UTC
This one cannot be fixed:
gcc -c   -g -O2  -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes  -fno-common -Wno-error  -DHAVE_CONFIG_H -DGENERATOR_FILE    -I. 
-Ibuild -I../../gcc/gcc -I../../gcc/gcc/build -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include  
\
 -o build/gengtype-yacc.o gengtype-yacc.c
/usr/share/bison.simple: In function `yyparse':
/usr/share/bison.simple:614: warning: comparison between signed and unsigned
/usr/share/bison.simple:626: warning: comparison between signed and unsigned


The following is a target one:
gcc -c   -g -O2  -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes  -fno-common   -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include  ../../gcc/gcc/varasm.c -o varasm.o
../../gcc/gcc/varasm.c: In function `assemble_variable':
../../gcc/gcc/varasm.c:1699: warning: empty body in an if-statement
../../gcc/gcc/varasm.c: In function `const_rtx_hash_1':
../../gcc/gcc/varasm.c:2843: warning: right shift count >= width of type


The long double bugs cannot be fixed, they are warnings only from the Apple's gcc.

The warnings from gengtype cannot be fixed.

Comment 2 aesok 2007-04-25 07:18:46 UTC
Subject: Bug 18989

Author: aesok
Date: Wed Apr 25 07:18:33 2007
New Revision: 124141

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124141
Log:
	PR target/18989
 	* config/avr/avr.h (ASM_OUTPUT_ALIGN): Redefine.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/avr/avr.h

Comment 3 aesok 2007-04-25 19:38:45 UTC
Subject: Bug 18989

Author: aesok
Date: Wed Apr 25 19:38:32 2007
New Revision: 124159

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124159
Log:
	PR target/18989
 	* config/avr/avr.h (ASM_OUTPUT_ALIGN): Redefine.

Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/config/avr/avr.h

Comment 4 aesok 2007-04-25 19:52:31 UTC
Subject: Bug 18989

Author: aesok
Date: Wed Apr 25 19:52:21 2007
New Revision: 124162

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124162
Log:
	PR target/18989
 	* config/avr/avr.h (ASM_OUTPUT_ALIGN): Redefine.

Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/config/avr/avr.h

Comment 5 Eric Weddington 2007-04-26 21:44:26 UTC
The committed patch fixes this warning:
../../gcc/gcc/varasm.c: In function `assemble_variable':
../../gcc/gcc/varasm.c:1699: warning: empty body in an if-statement


However, the following warning still exists:
../../gcc-4.1.2/gcc/varasm.c: In function `const_rtx_hash_1':
../../gcc-4.1.2/gcc/varasm.c:3029: warning: right shift count >= width of type
Comment 6 Georg-Johann Lay 2012-03-03 14:23:12 UTC
This is PR-rot, obviously