[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
check that '#include <string>' works, too
From: |
Paul Eggert |
Subject: |
check that '#include <string>' works, too |
Date: |
Thu, 02 Feb 2006 00:05:32 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Another of Nelson H. F. Beebe's test found a compiler
(intel-icc8-8.1-033 on GNU/Linux 2.4.18) where compiling
calc++-scanner.cc failed as follows:
/usr/include/pthread.h(163): error: expected a ")"
extern int pthread_create (pthread_t *__restrict __thread,
^
Tracking it through how GCC works on my host, it appears that
"#include <string>" includes char_traits.h, which includes
bits/stl_algobase.h, which includes iosfwd, which includes
bits/c++io.h, which includes bits/gthr.h, which includes
bits/gthr-default.h, which includes pthread.h -- or at least that's
how it works if I understand it aright (I'm not a C++ expert, thank
goodness), and my guess is that icc doesn't support __restrict but
tries to pretend to be GCC so fools the glibc header into using
__restrict.
I installed this to attempt to work around the problem.
2006-02-01 Paul Eggert <address@hidden>
Work around portability problems summarized by Nelson H. F. Beebe in
<http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
* m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
that '#include <string>' works.
--- m4/cxx.m4 20 Jan 2006 01:59:30 -0000 1.5
+++ m4/cxx.m4 2 Feb 2006 07:33:13 -0000 1.6
@@ -29,6 +29,7 @@ AC_DEFUN([BISON_TEST_FOR_WORKING_CXX_COM
[AC_LANG_PROGRAM(
[#include <cstdlib>
#include <iostream>
+ #include <string>
using namespace std;],
[std::cerr << "";
cout << "";])],
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- check that '#include <string>' works, too,
Paul Eggert <=