This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Decrement
- From: Falk Hueffner <hueffner at informatik dot uni-tuebingen dot de>
- To: Markus Hofmann <mailingMax at web dot de>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 10 Jul 2004 15:17:59 +0200
- Subject: Re: Decrement
- References: <40EF8A00.3030907@web.de>
Markus Hofmann <mailingMax@web.de> writes:
> I don't know exactly if we found a bug. I have no expierence in fill
> out bugzilla.
>
> Our problem is the following line of code:
> int x = 100;
> x -= x-- - --x;
Not a bug in gcc; this code has undefined behaviour, and gcc would
have warned about that if you had turned on compiler warnings. See the
documentation on -Wsequence-point.
--
Falk