bug-coreutils
[Top][All Lists]
Advanced

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

bug#30718: coreutils-8.29 compilation failure using xlC on AIX


From: Paul Eggert
Subject: bug#30718: coreutils-8.29 compilation failure using xlC on AIX
Date: Mon, 5 Mar 2018 15:55:51 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

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.


Attachment: 0001-stat-work-around-IBM-xlC-bug.patch
Description: Text Data


reply via email to

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