[Top][All Lists]

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

[Bug-apl] Bogus compiler warnings

From: Alexey Veretennikov
Subject: [Bug-apl] Bogus compiler warnings
Date: Thu, 9 Mar 2017 11:29:30 +0100


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:

SomeObject * ptr = 0;

ptr = new SomeObject();

So I can fix them by rearranging a code a little. It doesn't hurt as it seems.
But maybe it is not way to go, to complicate the code to satisfy the ancient compiler?

There are other issues, mainly related to HEX macro, where we supply pointer to this macro.
On 32bits machine the conversion int64_t(const char*) produces the warning.
I could solve them by introducing

It  makes code compile without warnings but looks not that pleasant.

But maybe there is a possibility to turn off -Werror with the ./configure option?


reply via email to

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