Re: Compiler strictness


Subject: Re: Compiler strictness
From: Mike Nordell (tamlin@algonet.se)
Date: Fri Feb 02 2001 - 23:15:16 CST


Hubert Figuiere wrote:
> It looks like Apple compiler is more strict than gcc:

Surprised? :-)

> MrCpp C++ Compiler 4.1.0f1c1
> Copyright (C) 1994-1999 by Apple Computer, Inc.
>
> m_labelTable[index] = pLabel;
> ^
> File "ev_Menu_Labels.cpp"; line 119 #Error: can't assign to const variable

I'm almost 100% sure MrCpp is wrong. To be really sure I even tested it on
como (Comeau) and it says it's allright.

It's not trying to modify the variable, it's trying to modify what it points
to, which is a non-const EV_Menu_Label*.

I'd report this bug to Apple.

/Mike



This archive was generated by hypermail 2b25 : Sat Feb 03 2001 - 00:26:27 CST