[cfe-dev] How to suppress a specific diagnostic?

Ted Kremenek kremenek at apple.com
Mon Apr 30 14:41:09 PDT 2012


Hi Arthur,

Please file a Bugzilla PR, so we can track fixing this.  The reality is that not all of the warnings are guarded under flags, but the goal is to eventually have all of them covered under flags.

Thanks,
Ted

On Apr 28, 2012, at 11:17 AM, Fariborz Jahanian <fjahanian at apple.com> wrote:

> Objective-c is the oldest dialect of c added to clang. As such, old warnings have not
> kept up with new rules regarding having a diagnostic flag to turn them off/on. 
> 
> - Fariborz
> 
> On Apr 27, 2012, at 10:46 AM, Arthur O'Dwyer wrote:
> 
>> Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
>>> It's a bug if a warning does not have a corresponding
>>> option to disable it. So what warning are you talking about?
>> 
>> Then clang is full of bugs that I assume must be trivial to grep for. ;)
>> 
>> When I feed my example autogenerated code to clang 3.1
>> (tags/Apple/clang-318.0.58), I get this output:
>> 
>> x.m:2:1: warning: no 'assign', 'retain', or 'copy' attribute is
>> specified - 'assign' is assumed
>> @property Foo *foo;
>> ^
>> x.m:2:1: warning: default property attribute 'assign' not appropriate
>> for non-gc object
>> x.m:4:18: warning: division by zero is undefined
>> void f(int x) { x/=0; }
>>                ^ ~
>> 
>> That's three distinct warnings with no options to toggle any of them.
>> Unless ToT has addressed these warnings already.
>> 
>> -Arthur
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list