[cfe-dev] Unneeded declarations invalidation
dgregor at apple.com
Mon Jul 20 11:51:00 PDT 2009
On Jul 7, 2009, at 11:52 PM, Enea Zaffanella wrote:
> Eli Friedman wrote:
>> On Tue, Jul 7, 2009 at 3:46 AM, Enea Zaffanella<zaffanella at cs.unipr.it
>> > wrote:
>>> Index: include/clang/Basic/DiagnosticSemaKinds.td
>>> --- include/clang/Basic/DiagnosticSemaKinds.td (revision 74831)
>>> +++ include/clang/Basic/DiagnosticSemaKinds.td (working copy)
>>> @@ -1191,6 +1191,8 @@
>>> "arithmetic on pointer to void type">;
>>> def err_typecheck_decl_incomplete_type : Error<
>>> "variable has incomplete type %0">;
>>> +def warn_typecheck_decl_incomplete_type : Warning<
>>> + "variable has incomplete type %0">;
>> This should be an ExtWarn; it's generally the preferred
>> for issues which make the translation unit undefined at compile-time.
>> Also, it would be nice to explicitly point out the issue, more like
>> "tentative definition of variable with internal linkage has
>> type %0" (I actually don't particularly like that wording, but the
>> issue is a bit technical, so I'm not sure how to rephrase it.)
> The message now reads:
> "tentative definition of variable with internal linkage has
> incomplete non-array type %0"
> This also tells that an array type would directly lead to an error
> (which is the behavior in gcc).
> Please find attached the revised patch.
Looks good, thanks! Committed here:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev