[cfe-commits] r65969 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.def lib/Sema/SemaStmt.cpp test/SemaObjC/catch-stmt.m

Daniel Dunbar daniel at zuster.org
Tue Mar 3 15:33:34 PST 2009


Thanks Steve, I think an error is appropriate as in practice this will
not do what it looks like. It will behave as @catch of id, so we
should force users to write that unless there is a compelling reason
not to.

 - Daniel

On Tue, Mar 3, 2009 at 3:16 PM, steve naroff <snaroff at apple.com> wrote:
>
> On Mar 3, 2009, at 6:00 PM, Eli Friedman wrote:
>
>> On Tue, Mar 3, 2009 at 1:16 PM, Steve Naroff <snaroff at apple.com>
>> wrote:
>>> +    if (PVD->getType()->isObjCQualifiedIdType())
>>> +      return StmtError(Diag(PVD->getLocation(),
>>> +
>>> diag::warn_ignoring_qualifiers_on_catch_parm));
>>> +  }
>>
>> Either it's a warning or it's an error... if it's a warning, you have
>> to recover, and if it's an error, you have to mark it as such.  The
>> alternative is unintuitive errors or miscompilations when code that
>> expects a valid AST gets an invalid one.
>>
>
> Thanks for catching this (I changed it to a warning last minute).
>
> After thinking about it a bit more, decided to make it an error
> (though GCC doesn't diagnose this at all).
>
> snaroff
>
>> -Eli
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>




More information about the cfe-commits mailing list