This is the mail archive of the gcc@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: New gcc 4.0.0 warnings seem spurious


----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 <vincent+gcc@vinc17.org> 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....


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