[Developers] over 1000 compiler warnings when compiling CactusBase/LocalReduce

Jonathan Thornburg jthorn at aei.mpg.de
Fri Dec 23 07:57:09 CST 2005


[[ops, sorry, wrong subject line, the first time -- reposting
so people will see it with a correct subject line]]

If I compile CactusBase/LocalReduce (current CVS) with gcc 3.3.2,
with compile options
   -g -pipe -ffast-math
   -Wall -W -Wformat -Wno-unused -Wshadow -Winline -Wpointer-arith
   -Wcast-align -Wcast-qual -Wmissing-declarations -Wbad-function-cast
   -Wstrict-prototypes -Wmissing-prototypes
I get a total of 1360 (!) compiler warnings "cast discards qualifiers
from pointer target type".  Here, for example, are warnings for a single
function in a single source file:

/home/jonathan/cactus/Cactus/configs/test-movingexcision/build/LocalReduce/AvgFu
nctions.c: In function `LocalReduce_Avg_INT4':
/home/jonathan/cactus/Cactus/configs/test-movingexcision/build/LocalReduce/AvgFu
nctions.c:1010: warning: cast discards qualifiers from pointer target type
/home/jonathan/cactus/Cactus/configs/test-movingexcision/build/LocalReduce/AvgFu
nctions.c:1013: warning: cast discards qualifiers from pointer target type
/home/jonathan/cactus/Cactus/configs/test-movingexcision/build/LocalReduce/AvgFu
nctions.c:1017: warning: cast discards qualifiers from pointer target type
/home/jonathan/cactus/Cactus/configs/test-movingexcision/build/LocalReduce/AvgFu
nctions.c:1022: warning: cast discards qualifiers from pointer target type
/home/jonathan/cactus/Cactus/configs/test-movingexcision/build/LocalReduce/AvgFu
nctions.c:1027: warning: cast discards qualifiers from pointer target type
/home/jonathan/cactus/Cactus/configs/test-movingexcision/build/LocalReduce/AvgFu
nctions.c:1032: warning: cast discards qualifiers from pointer target type
/home/jonathan/cactus/Cactus/configs/test-movingexcision/build/LocalReduce/AvgFu
nctions.c:1036: warning: cast discards qualifiers from pointer target type
/home/jonathan/cactus/Cactus/configs/test-movingexcision/build/LocalReduce/AvgFu
nctions.c:1040: warning: cast discards qualifiers from pointer target type
/home/jonathan/cactus/Cactus/configs/test-movingexcision/build/LocalReduce/AvgFu
nctions.c:1045: warning: cast discards qualifiers from pointer target type
/home/jonathan/cactus/Cactus/configs/test-movingexcision/build/LocalReduce/AvgFu
nctions.c:1077: warning: cast discards qualifiers from pointer target type
/home/jonathan/cactus/Cactus/configs/test-movingexcision/build/LocalReduce/AvgFu
nctions.c:1117: warning: cast discards qualifiers from pointer target type
/home/jonathan/cactus/Cactus/configs/test-movingexcision/build/LocalReduce/AvgFu
nctions.c:1159: warning: cast discards qualifiers from pointer target type

Is this as it should be?  That is, are these warnings symptoms of
an overly-paranoid compiler, genuine bugs, or what?

ciao,

-- 
-- Jonathan Thornburg <jthorn at aei.mpg.de>
    Max-Planck-Institut fuer Gravitationsphysik (Albert-Einstein-Institut),
    Golm, Germany, "Old Europe"     http://www.aei.mpg.de/~jthorn/home.html
    "Washing one's hands of the conflict between the powerful and the
     powerless means to side with the powerful, not to be neutral."
                                       -- quote by Freire / poster by Oxfam




More information about the Developers mailing list