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

Mike Stump mrs at apple.com
Wed Jan 9 15:01:26 PST 2008


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.



More information about the cfe-commits mailing list