On Oct 5, 2010, at 5:34 PM, John McCall wrote:

> 
> On Oct 5, 2010, at 5:26 PM, jahanian wrote:
> 
>> 
>> On Oct 5, 2010, at 5:19 PM, John McCall wrote:
>> 
>>>> 
>>> 
>>> I agree that if we want to warn here, we should at least warn about 
>>> deprecated typedefs.  But my preference would be to not warn here at all.
>> 
>> Agreed. Actually, gcc does that too (please see my followup email).
> 
> I don't see this at all.  gcc seems to look through typedefs and warn based 
> on the underlying type's deprecatedness, unfortunately using the name of the 
> typedef.

I was trying to say the same think that you observed about gcc.
In any case, this is all done in clang to match gcc's behavior. 
In r115800.

- Fariborz

> 
> So this typeof produces a warning (misleadingly talking about 'bar'):
>  struct foo { int x; } __attribute__((deprecated));
>  typedef struct foo bar __attribute__((deprecated));
>  bar x;
>  int main() { typeof(x) y; }
> 
> But this one doesn't:
>  struct foo { int x; };
>  typedef struct foo bar __attribute__((deprecated));
>  bar x;
>  int main() { typeof(x) y; }
> 
> John.


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to