On 10/12/2020 16:10, webmaster wrote:

(As a general rule, you'll get more useful responses if you use your
name in your posts.  It's common courtesy.)


> Is it possible to request such feature?
> 

Of course you can file a request for it.  Go to the gcc bugzilla site:

<https://gcc.gnu.org/bugzilla/>

First, search thoroughly to see if it is already requested - obvious
duplicate requests just waste developers' time.  If you find a
duplicate, add a comment and put yourself on the cc list.  If you don't
find a duplicate, file it as a new bug.

Given the replies on this list from gcc developers, I would not hold my
breath waiting for this feature.  It is unlikely to be implemented
unless the relevant compiler passes are re-organised in some way, or
extra information is tracked.  So I don't think it will be a priority.

However, it's always good to track these things - and if many people
want a particular feature, it can't harm its chances of getting done
eventually.

mvh.,

David


> Am 09.12.2020 um 16:45 schrieb webmaster:
>> I have the following Code C\C++:
>>
>> static int foo = 0;
>>
>> static void bar(void)
>> {
>>     foo = 1;
>> }
>>
>> Here it is clear for the compiler that the variable foo can only be
>> accessed from the same modul and not from ther modules. From the
>> explanations before I understand that the variable is removed due to
>> optimization. But I do not understand why GCC does not throws a warning.
>>
>> >From my point of view it is responsibility of the developer to remove
>> the unused variable.
>>
> 
> 

Reply via email to