From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3784 invoked by alias); 11 Mar 2006 16:50:09 -0000 Received: (qmail 3742 invoked by uid 48); 11 Mar 2006 16:50:05 -0000 Date: Sat, 11 Mar 2006 16:50:00 -0000 Message-ID: <20060311165005.3741.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/11751] wrong evaluation order of an expression In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dberlin at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-03/txt/msg01256.txt.bz2 List-Id: ------- Comment #63 from dberlin at gcc dot gnu dot org 2006-03-11 16:49 ------- (In reply to comment #61) > referring to duplicate 26642: > > The behavior changed between gcc3 and gcc4 and the comment is "there is no > reason the result should not change"? There is simply no guarantee at all that the behavior of this will or won't change. It's undefined code. It could change depending on the phase of the moon. > > Sorry, but I think that's a really bad way to handle things. When a update > changes behavior, there should be et least an appropriate warning. Unfortunately, it is impossible to warn for every permuation of undefined code at compilation time. However, in general, if you write code whose semantics are undefined, you are going to get burned. This is just the way the ball bounces. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11751