This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

g++ 4.8 fails with -Ox option


Hi,

I get a strange problem with g++ 4.8. My server has gcc44-c++-4.4.1 installed.
I've installed gcc4.8 in my home from gcc-4.8-20130711.tar.gz gcc-4.8-infrastructure.tar.gz.
PATH, LD_LIBRARY_PATH are setup to reach first this 4.8 install.

Initially I get the error runing the configure script to build OpenMPI, so I extract the small peace of test code in "prog.C" file for testing and:

g++ -o conftest -DNDEBUG -finline-functions prog.C
Is working but:
g++ -o conftest -O3 -DNDEBUG -finline-functions prog.C
says:

In file included from /usr/include/stdio.h:909:0,
from prog.C:141:
/usr/include/bits/stdio.h: In function â__ssize_t getline(char**, size_t*, FILE*)â:
/usr/include/bits/stdio.h:118:52: error: â__getdelimâ was not declared in this scope
return __getdelim (__lineptr, __n, '\n', __stream);

Same behavior with -O2 or -O1.
g++ 4.8 works with -O0.

I've no idea about this problem. Thanks for your advices.

Patrick

--
===================================================================
|  Equipe M.O.S.T.         |                                      |
|  Patrick BEGOU           | mailto:Patrick.Begou@grenoble-inp.fr |
|  LEGI                    |                                      |
|  BP 53 X                 | Tel 04 76 82 51 35                   |
|  38041 GRENOBLE CEDEX    | Fax 04 76 82 52 71                   |
===================================================================



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]