[cfe-commits] r45784 - in /cfe/trunk: AST/ASTContext.cpp Sema/SemaDecl.cpp test/Sema/predefined-function.c

Steve Naroff snaroff at apple.com
Wed Jan 9 15:21:06 PST 2008


On Jan 9, 2008, at 3:01 PM, Mike Stump wrote:

> On Jan 9, 2008, at 2:43 PM, Steve Naroff wrote:
>> +	// C99 6.7.2.2p4: Each enumerated type shall be compatible with  
>> char,
>> +	// a signed integer type, or an unsigned integer type.
>> +	if ((lcanon->isEnumeralType() && rcanon->isIntegralType()) ||
>> +	    (rcanon->isEnumeralType() && lcanon->isIntegralType()))
>> +	  return true;
>> +	
>
> Unfortunately, this is wrong.?  The type has to be the same size to  
> be compatible, so, at the very least, you need a FIXME: also check  
> the size and ensure it is the same.

Understood. I'll add a FIXME...

Thanks,

snaroff




More information about the cfe-commits mailing list