Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

gcc predefined constants

david_gordon
Beginner
519 Views
Sorry if this deserves an RTFM-type response, but I've hunted around the boards and can't even find an example of anyone else having the same problem.

All I want to do is slot in icpc in place of g++ but when I set -cxxlib-gcc and -gcc-version=331 I get lots of errors about undefined constants, e.g:

/usr/local/gcc/include/c++/3.3.1/limits(280): error: identifier "__CHAR_BIT__" is undefined
static const int digits = __glibcpp_digits (char);
^

/usr/local/gcc/include/c++/3.3.1/limits(330): error: identifier "__CHAR_BIT__" is undefined
static const int digits = __glibcpp_digits (signed char);
^

/usr/local/gcc/include/c++/3.3.1/limits(326): error: identifier "__SCHAR_MAX__" is undefined
{ return -__SCHAR_MAX__ - 1; }
^

/usr/local/gcc/include/c++/3.3.1/limits(328): error: identifier "__SCHAR_MAX__" is undefined
{ return __SCHAR_MAX__; }
^

/usr/local/gcc/include/c++/3.3.1/limits(380): error: identifier "__CHAR_BIT__" is undefined
static const int digits = __glibcpp_digits (unsigned char);
^

/usr/local/gcc/include/c++/3.3.1/limits(378): error: identifier "__SCHAR_MAX__" is undefined
{ return __SCHAR_MAX__ * 2U + 1; }
^


What am I not doing?

thanks,

David
0 Kudos
2 Replies
TimP
Honored Contributor III
519 Views
I suspect that it wants version=330 for any 3.3.x g++ library.
0 Kudos
John_O_Intel
Employee
519 Views
Hi David,
This is now supported. The initial icc 8.0 release didn't support compatibility with gcc 3.3.x. icc package l_cc_pc_8.0.058 and later will support this.
$ icc -V
Intel C++ Compiler for 32-bit applications, Version 8.0 Build 20031231Z Package ID: l_cc_pc_8.0.058
Here is the command line I've used to point gcc 3.3 that isn't in my path.
icc -gcc-version=332 -gcc-name=/usr/local/gcc-3.3.2/bin/gcc foo-main.cpp -cxxlib-gcc foo.o
Regards,
John O'Neill
0 Kudos
Reply