[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 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

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

        * 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
         [#include <cstdlib>
          #include <iostream>
+         #include <string>
          using namespace std;],
          [std::cerr << "";
           cout << "";])],

reply via email to

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