bug-gnulib
[Top][All Lists]
Advanced

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

Re: M4 tests fail when built with PGI compilers


From: Paul Eggert
Subject: Re: M4 tests fail when built with PGI compilers
Date: Mon, 30 Jan 2017 18:44:15 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 01/30/2017 02:39 PM, Eric Blake wrote:

I don't think test-intprops.c is compatible with the PGI compilers.

Yes, test-intprops.c runs afoul of a problem in the PGI compiler. I can reproduce the problem in PGI 16.10 x86-64 by compiling this one-line program:

  short bar = -32768 <= 100000 && 100000 <= 32767  ? (short) 100000 : 0;

Although this is valid C code and is well-defined to initialize 'bar' to 0 on x86-64, pgcc warns "Constant value out of range for signed short or char". Since the expression "(short) 100000" is not evaluated, the warning is bogus. Although PGI generates thousands of similar warnings for test-intprops.c, I expect that they are all bogus and that you can ignore them. As 'make check' does not fail and I don't see an easy way to suppress the bogus warnings, I suspect we ought to leave the code alone.

Admittedly these warnings are annoying. Adam, since you're a PGI user, perhaps you could report the compiler bug or bugs to the PGI maintainers.

While I was at it, I looked at the other warnings that PGI generates for GNU M4, and managed to silence most of the rest with this Gnulib patch:

http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=16f6a8d8d81cc93745a24c0fb89caab2c383ae3c

A half-dozen or so of the thousands of Gnulib warnings were actual portability bugs in Gnulib, which made the exercise worth doing I suppose. I don't think these bugs affect GNU M4.



reply via email to

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