Binutils 2.47 fails to build with warning 'exp.X_op' may be used uninitialized
Alan Modra
amodra@gmail.com
Sun Aug 9 08:45:37 GMT 2026
On Sat, Aug 08, 2026 at 07:47:12PM +0200, R. Diez via Binutils wrote:
> Hi all:
>
> Binutils 2.47 fails to build with this error message:
>
> -------8<-------8<-------
>
> CCLD as-new
> /home/rdiez/blah.../binutils-2.47/gas/config/tc-arm.c: In function 'parse_immediate.constprop':
> /home/rdiez/blah.../binutils-2.47/gas/config/tc-arm.c:5198:10: error: 'exp.X_op' may be used uninitialized [-Werror=maybe-uninitialized]
> 5198 | if (exp.X_op != O_constant)
> | ^
> /home/rdiez/blah.../binutils-2.47/gas/config/tc-arm.c:5195:15: note: 'exp' declared here
> 5195 | expressionS exp;
> | ^
> lto1: all warnings being treated as errors
>
> -------8<-------8<-------
>
> Is this a known issue? The older Binutils 2.46.1 builds fine in the same setup.
exp.X_op can indeed be used uninitialised. You found a real error,
one that has been there for quite a while. 2.46 built OK because
usually we turn off -Werror on releases, but somehow that was
forgotten for 2.47.
--
Alan Modra
More information about the Binutils
mailing list