This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

C Warnings


>From the current CVS, there seems to be a big proportion of signedness
warnings. I'm no C expert, the ones I looked at seem fixable by adding
a few unsigned in some size and alignement declarations, by const casts or
prototype editing.  What is the current policy for warnings in the C
source area? Is a patch to fix the ones that look simple welcomed, or
is the problem more difficult than it seems to me?

I don't know if there's an easy way to fix the gcc.c string length
warnings, any idea?

-- 
Laurent Guerby <guerby@acm.org>

stage1/xgcc -Bstage1/ -B/home/guerby/work/gcc/install-alt4/i686-pc-linux-gnu/bin/ -c  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include ../../gcc/gcc/cfgrtl.c -o cfgrtl.o
../../gcc/gcc/cfgrtl.c: In function `purge_all_dead_edges':
../../gcc/gcc/cfgrtl.c:1928: warning: promoted argument `update_life_p' doesn't match prototype
../../gcc/gcc/basic-block.h:641: warning: prototype declaration
../../gcc/gcc/cfgrtl.c:1930: warning: `blocks' might be used uninitialized in this function

stage1/xgcc -Bstage1/ -B/home/guerby/work/gcc/install-alt4/i686-pc-linux-gnu/bin/ -c  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include ../../gcc/gcc/combine.c -o combine.o
../../gcc/gcc/combine.c: In function `find_split_point':
../../gcc/gcc/combine.c:2995: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c: In function `combine_simplify_rtx':
../../gcc/gcc/combine.c:3948: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c: In function `simplify_logical':
../../gcc/gcc/combine.c:5348: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:5444: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c: In function `expand_field_assignment':
../../gcc/gcc/combine.c:5701: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:5712: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c: In function `force_to_mode':
../../gcc/gcc/combine.c:6833: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:6878: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:6890: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:6946: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:7007: warning: signed and unsigned type in conditional expression
../../gcc/gcc/combine.c:7029: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:7078: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c: In function `simplify_shift_const':
../../gcc/gcc/combine.c:9065: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:9405: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:9426: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:9468: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c: In function `recog_for_combine':
../../gcc/gcc/combine.c:9599: warning: pointer targets in passing arg 1 of `do_SUBST_INT' differ in signedness
../../gcc/gcc/combine.c: In function `simplify_comparison':
../../gcc/gcc/combine.c:9856: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:10464: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:10721: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:10797: warning: comparison between signed and unsigned
../../gcc/gcc/combine.c:10810: warning: comparison between signed and unsigned

stage1/xgcc -Bstage1/ -B/home/guerby/work/gcc/install-alt4/i686-pc-linux-gnu/bin/ -c  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include ../../gcc/gcc/cse.c -o cse.o
../../gcc/gcc/cse.c: In function `fold_rtx':
../../gcc/gcc/cse.c:3498: warning: comparison between signed and unsigned
../../gcc/gcc/cse.c:3500: warning: comparison between signed and unsigned
../../gcc/gcc/cse.c:3633: warning: comparison between signed and unsigned
../../gcc/gcc/cse.c:3644: warning: comparison between signed and unsigned
../../gcc/gcc/cse.c:4251: warning: comparison between signed and unsigned

stage1/xgcc -Bstage1/ -B/home/guerby/work/gcc/install-alt4/i686-pc-linux-gnu/bin/ -c  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include ../../gcc/gcc/emit-rtl.c -o emit-rtl.o
../../gcc/gcc/emit-rtl.c: In function `get_mem_attrs':
../../gcc/gcc/emit-rtl.c:292: warning: comparison between signed and unsigned
../../gcc/gcc/emit-rtl.c: In function `adjust_address_1':
../../gcc/gcc/emit-rtl.c:1904: warning: comparison between signed and unsigned
../../gcc/gcc/emit-rtl.c:1904: warning: signed and unsigned type in conditional expression
../../gcc/gcc/emit-rtl.c: In function `offset_address':
../../gcc/gcc/emit-rtl.c:1938: warning: comparison between signed and unsigned
../../gcc/gcc/emit-rtl.c:1938: warning: signed and unsigned type in conditional expression

stage1/xgcc -Bstage1/ -B/home/guerby/work/gcc/install-alt4/i686-pc-linux-gnu/bin/ -c  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include ../../gcc/gcc/fold-const.c -o fold-const.o
../../gcc/gcc/fold-const.c: In function `div_and_round_double':
../../gcc/gcc/fold-const.c:686: warning: comparison between signed and unsigned
../../gcc/gcc/fold-const.c: In function `optimize_bit_field_compare':
../../gcc/gcc/fold-const.c:2999: warning: comparison between signed and unsigned

stage1/xgcc -Bstage1/ -B/home/guerby/work/gcc/install-alt4/i686-pc-linux-gnu/bin/ -c  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include ../../gcc/gcc/function.c -o function.o
../../gcc/gcc/function.c: In function `assign_stack_temp_for_type':
../../gcc/gcc/function.c:662: warning: comparison between signed and unsigned
../../gcc/gcc/function.c:668: warning: comparison between signed and unsigned
../../gcc/gcc/function.c:734: warning: signed and unsigned type in conditional expression

stage1/xgcc -Bstage1/ -B/home/guerby/work/gcc/install-alt4/i686-pc-linux-gnu/bin/  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include -c insn-emit.c
insn-emit.c: In function `gen_split_995':
insn-emit.c:9541: warning: comparison between signed and unsigned

stage1/xgcc -Bstage1/ -B/home/guerby/work/gcc/install-alt4/i686-pc-linux-gnu/bin/ -c  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include ../../gcc/gcc/profile.c -o profile.o
../../gcc/gcc/profile.c: In function `output_gcov_string':
../../gcc/gcc/profile.c:198: warning: signed and unsigned type in conditional expression

stage1/xgcc -Bstage1/ -B/home/guerby/work/gcc/install-alt4/i686-pc-linux-gnu/bin/ -c  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include ../../gcc/gcc/regmove.c -o regmove.o
../../gcc/gcc/regmove.c: In function `find_matches':
../../gcc/gcc/regmove.c:1587: warning: comparison between signed and unsigned

stage1/xgcc -Bstage1/ -B/home/guerby/work/gcc/install-alt4/i686-pc-linux-gnu/bin/ -c  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include ../../gcc/gcc/reload1.c -o reload1.o
../../gcc/gcc/reload1.c: In function `alter_reg':
../../gcc/gcc/reload1.c:2055: warning: passing arg 2 of `set_mem_decl' from incompatible pointer type

stage1/xgcc -Bstage1/ -B/home/guerby/work/gcc/install-alt4/i686-pc-linux-gnu/bin/ -c  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include ../../gcc/gcc/tlink.c -o tlink.o
../../gcc/gcc/tlink.c: In function `recompile_files':
../../gcc/gcc/tlink.c:498: warning: passing arg 1 of `putenv' discards qualifiers from pointer target type
../../gcc/gcc/tlink.c:499: warning: passing arg 1 of `putenv' discards qualifiers from pointer target type

stage1/xgcc -Bstage1/ -B/home/guerby/work/gcc/install-alt4/i686-pc-linux-gnu/bin/  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include \
  -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/home/guerby/work/gcc/install-alt4/lib/gcc-lib/\" -DDEFAULT_TARGET_VERSION=\"3.1\" -DDEFAULT_TARGET_MACHINE=\"i686-pc-linux-gnu\" -DSTANDARD_BINDIR_PREFIX=\"/home/guerby/work/gcc/install-alt4/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" `test "X${SHLIB_LINK}" = "X" || test "yes" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` `test "X${SHLIB_MULTILIB}" = "X" || echo "-DNO_SHARED_LIBGCC_MULTILIB"` \
  -c ../../gcc/gcc/gcc.c)
../../gcc/gcc/gcc.c:647: warning: string length `930' is greater than the length `509' ISO C89 compilers are required to support
../../gcc/gcc/gcc.c:803: warning: string length `564' is greater than the length `509' ISO C89 compilers are required to support
../../gcc/gcc/gcc.c:1374: warning: string length `935' is greater than the length `509' ISO C89 compilers are required to support


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]