Bug in pgc++ 18.10?

Dear all,

The simple “hello world” program:

int main() {
std::cout << “Hello world” << std::endl;
return 0;

triggers the following compilation error when compiler called with -I/usr/include:

% pgc++ -I/usr/include test.cc
“/usr/include/bits/floatn.h”, line 74: error: 128-bit floating-point types are
not supported in this configuration
typedef _Complex float __cfloat128 attribute ((mode (TC)));
“/usr/include/c++/8/cstdlib”, line 75: catastrophic error: cannot open source
file “stdlib.h”
#include_next <stdlib.h>
1 error and 1 catastrophic error detected in the compilation of “test.cc”.
Compilation terminated.

Does anyone has an idea to remedy? The version of g++ is
g++ (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2)
and it works fine when compiling with same option:
% g++++ -I/usr/include test.cc

Many thanks,

Hi Patrick,

This isn’t a bug. The error is due to the fact PGI doesn’t support 128-bit floating types so the macro “__HAVE_FLOAT128” should not be defined in “floatn.h”. Hence you need to be using the PGI supplied version of this header file instead of the system version.

To fix, remove the “-I/usr/include” from your compile options. pgc++ will implicitly add this to your compile options but only after including the PGI supplied headers.

Hope this helps,