egcs-1.0, cccp.c, warning from DEC C
Richard Henderson
rth@cygnus.com
Tue Dec 9 11:48:00 GMT 1997
In article <9712091136.AA23105.cygnus.egcs.bugs@progis.de>,
Klaus Kaempf <kkaempf@progis.de> wrote:
>
> simplify_filename (pend_includes[i] = argv[++i]);
> ............^
>%CC-W-UNDEFVARFETCH, In this statement, the expression "simplify_filename(...)"
> modifies "i", and fetches its value in a computation that is not used to
> produce the modified value without an intervening sequence point. This
> behavior is undefined.
>
>From my understanding of the C language, dec c is right and cccp.c is wrong.
Yep. I've wanted gcc -Wall to be able to detect things like
that for some time.
r~
More information about the Gcc-bugs
mailing list