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]
Other format: [Raw text]

Re: [tree-ssa] Statement with no effect warning


> eIn message <20031216143133.GE19896@atrey.karlin.mff.cuni.cz>, Jan Hubicka 
> write
> s:
>  >Hi,
>  >I got bit by the fact that tree-SSA does not emit statement with no
>  >effect warnings currently, as these happens during expansion and we of
>  >course elliminate such statement much earlier.  What is the best place
>  >to re-implement such a warnings?
> So how again did the latest cgraphunit.c changes pass a bootstrap test
> then?  They're failing on i686-pc-linux-gnu.
> 
> stage1/xgcc -Bstage1/ -B/home/cygnus/dnovillo/perf/sbox/tree-ssa-branch/local.i
> 686/inst.toribio/i686-pc-linux-gnu/bin/ -c   -g -O2  -DIN_GCC   -W -Wall 
> -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic 
> -Wno-long-long -Wold-style-definition -Werror    -DHAVE_CONFIG_H    -I. -I. 
> -I/home/cygnus/dnovillo/perf/sbox/tree-ssa-branch/local.i686/src/gcc 
> -I/home/cygnus/dnovillo/perf/sbox/tree-ssa-branch/local.i686/src/gcc/. 
> -I/home/cygnus/dnovillo/perf/sbox/tree-ssa-branch/local.i686/src/gcc/../include
>  -I/home/cygnus/dnovillo/perf/sbox/tree-ssa-branch/local.i686/src/gcc/../libban
> shee/libcompat -I/home/cygnus/dnovillo/perf/sbox/tree-ssa-branch/local.i686/src
> /gcc/../libbanshee -I/home/cygnus/dnovillo/perf/sbox/tree-ssa-branch/local.i686
> /src/gcc/../libbanshee/points-to  /home/cygnus/dnovillo/perf/sbox/tree-ssa-bran
> ch/local.i686/src/gcc/cgraphunit.c -o cgraphunit.o/home/cygnus/dnovillo/perf/sb
> ox/tree-ssa-branch/local.i686/src/gcc/cgraphunit.c: In function 
> `cgraph_remove_unreachable_nodes':
>                                                                                
> 
> /home/cygnus/dnovillo/perf/sbox/tree-ssa-branch/local.i686/src/gcc/cgraphunit.c
> :763: warning: statement with no effect

OK,
I see now that c-simplify already has code to do the warning.  I just
got caught by checking code and the fact that
expr_with_side_effect == expr
does not construct statement with no side effects.  Do we want some
scheme of warning for non-void expressions whose results is ignored or
it is way to the hell?  (definitly calls are such expressions where we
don't want warning like some lint checkers do)

Ignore the comments about non-checking bootstrap.  As I've checked
Diego's machines did run earlier than I've commited the patch.  Hope
that all the problems are fixed by now.

Honza
> 
> Jeff


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