GNU bug report logs - #30718
AIX: test failures (missing '[', shared lib problem)

Previous Next

Package: coreutils;

Reported by: John Wiersba <jrw32982 <at> yahoo.com>

Date: Mon, 5 Mar 2018 21:10:01 UTC

Severity: normal

Full log


Message #8 received at 30718 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: John Wiersba <jrw32982 <at> yahoo.com>, 30718 <at> debbugs.gnu.org
Subject: Re: bug#30718: coreutils-8.29 compilation failure using xlC on AIX
Date: Mon, 5 Mar 2018 15:55:51 -0800
[Message part 1 (text/plain, inline)]
On 03/05/2018 12:48 PM, John Wiersba wrote:
> I'm not sure of the rationale for using enum here, but apparently the AIX xlC compiler
> doesn't like it.

That's a bug in the IBM xlC compiler; could you please report it to IBM?

The code uses an enum because it wants to name the expression. The C 
standard requires that static array sizes have constant bounds, and 
enums are constants, so this technique conforms to C89 (as well as to 
C99 and C11). If the IBM compiler is complaining about it then it's not 
conforming to the standard. Most likely the compiler is incorrectly 
hoisting the static decl to be as if it were outside the function body, 
which is an incorrect transformation.

Anyway, I installed the attached patch into coreutils, to work around 
the compiler bug. Thanks for reporting the problem.


[0001-stat-work-around-IBM-xlC-bug.patch (text/x-patch, attachment)]

This bug report was last modified 6 years and 233 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.