[cfe-commits] Implement 'mutable'

Douglas Gregor dgregor at apple.com
Thu Nov 13 11:52:06 PST 2008


On Nov 13, 2008, at 2:40 PM, Sebastian Redl wrote:

> Douglas Gregor wrote:
>>
>> On Nov 8, 2008, at 12:32 PM, Sebastian Redl wrote:
>>> This patch implements parsing and semantic analysis of the mutable  
>>> keyword in C++.
>>
>> Cool.
>>
>> +DIAG(err_bad_mutable, ERROR,
>> +     "'mutable' can only be applied to non-const, non-static, non- 
>> reference "
>> +     "class data members")
>>
>> That "non-const, non-static, non-reference" is a real mouthful. I  
>> think it would be clearer if you split this into separate error  
>> messages for "const", one for "static", references, and for things  
>> that aren't data members.
> I'll see what I can do.

Thanks.

>> Other than that, it looks good. Are you planning to submit a follow- 
>> up patch that deals with the constness of MemberExprs for mutable  
>> members?
> Do we even have MemberExprs yet? If we do, of course I will.

Yes, we do.

> However, the mutable patch currently sits outside the source tree  
> (and wouldn't apply cleanly), so I won't commit it until my work on  
> new/delete is complete.

It's on my review queue :)

	- Doug



More information about the cfe-commits mailing list