This is the mail archive of the gcc-bugs@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: Decrement


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


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