From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28479 invoked by alias); 27 Apr 2005 14:44:11 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 28079 invoked from network); 27 Apr 2005 14:43:46 -0000 Received: from unknown (HELO SERRANO.CAM.ARTIMI.COM) (217.40.213.68) by sourceware.org with SMTP; 27 Apr 2005 14:43:46 -0000 Received: from 127.0.0.1 (AVG SMTP 7.0.308 [266.10.3]); Wed, 27 Apr 2005 15:43:45 +0100 Received: from mace ([192.168.1.25]) by SERRANO.CAM.ARTIMI.COM with Microsoft SMTPSVC(6.0.3790.211); Wed, 27 Apr 2005 15:43:45 +0100 From: "Dave Korn" To: Subject: RE: New gcc 4.0.0 warnings seem spurious Date: Wed, 27 Apr 2005 15:00:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <20050427135851.GA3983@ay.vinc17.org> Message-ID: X-OriginalArrivalTime: 27 Apr 2005 14:43:45.0327 (UTC) FILETIME=[839C4BF0:01C54B37] X-SW-Source: 2005-04/txt/msg01506.txt.bz2 ----Original Message---- >From: Vincent Lefevre >Sent: 27 April 2005 14:59 > On 2005-04-27 15:30:39 +0200, Gabriel Dos Reis wrote: >> Vincent Lefevre writes: >> >> [...] >> >>>> > But if they are never modified, they evaluate to constants, right? >>>> > > The fact that they are not considered as constant expressions, >>>> > is it due to the fact that the environment is allowed to modify > >>>> them? >>>> >>>> It's due to what the C standard says. A const variable in C isn't a >>>> constant, it's just a read-only variable. >>> >>> 1+1 isn't a constant either >> >> It is an integer constant expression, and its evaluation yields a >> constant (see 6.6). Can you explain why you believe that is false? > > I never said that it was false. Yes you did. You _implied_ it. You said "1+1 isn't a constant either". Gabriel said that it is a constant, and explained precisely why it is a constant. He then asked you what you thought was false in his explanation. He did not claim that you had already said his explanation was false, but, if you still believe "1+1 isn't a constant either", then you *must* also believe that Gabi's explanation of why it **IS** a constant is false. > Could you please read messages before replying? It just goes to show that merely reading messages before replying isn't sufficient either. You have to *comprehend* them too. Vincent, it is time you went and did some background research, rather than carry on pontificating on subjects on which you are completely misinformed. You appear to be acting under the belief that you are the only person ever to correctly understand the C language spec and that everyone who has ever implemented a C compiler has got it wrong. This is unlikely, to say the least. cheers, DaveK -- Can't think of a witty .sigline today....