[cfe-commits] r56595 - in /cfe/trunk: include/clang/Basic/DiagnosticKinds.def lib/Sema/SemaExpr.cpp test/Sema/block-call.c test/Sema/block-return.c

Mike Stump mrs at apple.com
Wed Sep 24 18:00:26 PDT 2008


On Sep 24, 2008, at 4:31 PM, Steve Naroff wrote:
> New Revision: 56595

> Downgrade incompatible block pointer error to a warning (to be  
> consistent with incompatible pointer warnings in general).

:-(  In gcc these are all hard errors I believe, and I think in clang  
they should be hard errors as well.  Strong typing in this case I  
don't think poses a problem.

> -  short (^add1)(void) = ^{ return y+1; }; // expected-error  
> {{incompatible block pointer types initializing 'int (^)(void)',  
> expected 'short (^)(void)'}}
> +  short (^add1)(void) = ^{ return y+1; }; // expected-warning  
> {{incompatible block pointer types initializing 'int (^)(void)',  
> expected 'short (^)(void)'}}



More information about the cfe-commits mailing list