GNU bug report logs -
#30718
AIX: test failures (missing '[', shared lib problem)
Previous Next
Full log
View this message in rfc822 format
[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.