On Wed, 09 Dec 2009 19:54:51 -0800
  "Gokulakannan Somasundaram" <[email protected]> wrote:
> 
>>
>> Assigning it to 0, will again cause trouble for C++ folks.
> 
> 
> No it won't, because 0 is a valid (indeed, the preferred) way of 
>writing
> a null pointer constant in C++.
> 
> 
> 
> I think you misunderstood me. I said assigning 0 to a enum in C++ 
>will throw a compiler error. 

I didn't though :). See email about new initialization rules. I think 
that they are much mire in keeping with C and C++. More generally it 
makes the grammar programmer responsible for behaviour, which is in 
line with the rest of the C stuff.

David's point about C++ is correct though 0 == NULL is guranteed in 
ANSI C, evenbthough rhe compiler must work it out. Better to use NULL 
consistently and try to avoid adding to the billion dollars.

Jim
> 
> Gokul.
> 
> 
> 


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--

You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.


Reply via email to