Ok, this makes sense to message this as an old syntax that is deprecated, with 
the old syntax having unintended behavior in some cases.

On Aug 17, 2012, at 2:51 PM, jahanian <[email protected]> wrote:

> In r162138. 
> Nick suggested making this a deprecated warning as we have standardized on 
> using the "hidden"
> attribute. Message should be more clear now.
> I did not provide a "fixit" for this. This is because it would involve 
> replacing the storage class specifier with
> the attribute and AFAIK, we don't keep track of location of storage 
> specifiers.
> 
> - fariborz
> 
> On Aug 15, 2012, at 2:22 PM, Ted Kremenek wrote:
> 
>> Sounds good.  I think the general consensus is that we need the warning to 
>> be clearer on the issue in order for it to be useful.  Thanks for working on 
>> this!
>> 
>> On Aug 15, 2012, at 2:19 PM, jahanian <[email protected]> wrote:
>> 
>>> I am holding back until I hear from Nick. His observation of "unexpected 
>>> behavior" is different than mine. I need to compare notes with him first.
>>> 
>>> - Fariborz
>>> 
>>> On Aug 15, 2012, at 2:12 PM, Ted Kremenek wrote:
>>> 
>>>> On Aug 15, 2012, at 1:39 PM, Richard Smith <[email protected]> wrote:
>>>> 
>>>>> The diagnostic message should be sufficient for a typical user to have 
>>>>> some idea of what is wrong. The current diagnostic does not meet this 
>>>>> standard. If you explain in a bit more detail what the problem is, maybe 
>>>>> someone will be able to come up with better diagnostic wording. In any 
>>>>> case, diagnostic messages should not start with a capital letter.
>>>> 
>>>> Agreed.  Looking at the warning:
>>>> 
>>>>> arning: Use of __private_extern__ on tentative definition has unexpected 
>>>>> behaviour - use
>>>>>       __attribute__((visibility("hidden"))) on extern declaration or 
>>>>> definition instead [-Wprivate-extern]
>>>>> __private_extern__ int xyz;
>>>> 
>>>> The "unexpected behaviour" (behavior is misspelled) is content free.  
>>>> That's the part that needs to be elaborated.
>>>> 
>>>> The "use  __attribute__((visibility("hidden"))) on extern declaration or 
>>>> definition instead " can be a note on the warning, which allows you to 
>>>> break the warning up.  A FixIt would also be nice.
>>> 
>> 
> 

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

Reply via email to