Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 21 Nov 2001 09:56:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 21 Nov 2001 09:56:22 -0500 Received: from leibniz.math.psu.edu ([146.186.130.2]:41890 "EHLO math.psu.edu") by vger.kernel.org with ESMTP id ; Wed, 21 Nov 2001 09:56:17 -0500 Date: Wed, 21 Nov 2001 09:56:15 -0500 (EST) From: Alexander Viro To: "Richard B. Johnson" cc: Jan Hudec , linux-kernel@vger.kernel.org Subject: Re: [BUG] Bad #define, nonportable C, missing {} In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Nov 2001, Richard B. Johnson wrote: > On Wed, 21 Nov 2001, Jan Hudec wrote: > > > > > *a++ = byte_rev[*a] > > > It looks perferctly okay to me. Anyway, whenever would you listen to a > > > C++ book talking about good C coding :p > > > > It's simple. If any object is modified twice without an intervening > sequence point, the results are undefined. That's not all. There's another case - when modification and use of the same object happen in undefined order. And that's precisely what happens here - same as in case of (x + ++x) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/