[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Bogus compiler warnings

From: Alexey Veretennikov
Subject: Re: [Bug-apl] Bogus compiler warnings
Date: Thu, 9 Mar 2017 12:28:56 +0100


I'll attach some examples later today's evening, but from top of my head for example PrintBuffer.cc line 150.
const ShapeItem cols = value.get_last_shape_item();

As I told, these warnings are bogus since there is no branching etc in these cases at least from what I see.
And older GCC is known to have these redundant/bogus warnings.

2017-03-09 11:34 GMT+01:00 Elias Mårtenson <address@hidden>:
On 9 March 2017 at 18:29, Alexey Veretennikov <address@hidden> wrote:

I'm trying to compile GNU APL with GCC 3.4.6 armv5. There are couple of bogus compiler warnings, mainly about variable might be uninitialized.
Sometimes the situations are like this:

SomeObject * ptr = new SomeObject(arg);

- here compiler complains (sometimes) what ptr might be used uninitialized.
I've fixed it by separating variable declaration and initialization with the real value, like this:
In the beginning of the function:

Can you show the fill error message, including the file/line? I'm wondering because I cannot see how ptr could ever be used uninitialised in that example. There must be more to it that you didn't include.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]