This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: invalid "may be used uninitialized" warning with g++ current


Thanks,

Sorry, but I don't understood  - is it impossible to fix, so there are
no needs in bug report?
Or PR about this issue already exists?
Or it's not a bug?

Dmitry


2009/2/5 Andrew Pinski <pinskia@gmail.com>:
> On Wed, Feb 4, 2009 at 1:18 PM, Дмитрий Дьяченко <dimhen@gmail.com> wrote:
>> The following code
>>
>> int bar(int *global)
>> {
>>    int local;
>>    if(&local != global)
>>        return 0;
>>    return local;
>> }
>
> The issue is that GCC does not figure that global cannot point to
> local so it does not optimize away the if statement.
>
> Thanks,
> Andrew Pinski
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]