]> gcc.gnu.org Git - gcc.git/commitdiff
re PR libstdc++/34032 (-std=c++0x causes undeclared symbols errors on cygwin)
authorPaolo Carlini <pcarlini@suse.de>
Fri, 9 Nov 2007 15:54:33 +0000 (15:54 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 9 Nov 2007 15:54:33 +0000 (15:54 +0000)
2007-11-09  Paolo Carlini  <pcarlini@suse.de>

PR libstdc++/34032
* acinclude.m4 ([GLIBCXX_ENABLE_C99], [GLIBCXX_CHECK_C99_TR1]):
Use -std=c++98 instead of the default -std=gnu++98.
* configure: Regenerate.

From-SVN: r130047

libstdc++-v3/ChangeLog
libstdc++-v3/acinclude.m4
libstdc++-v3/configure

index 7abb3c281c166a78f4af6b627c5a6eb322b06db3..baea4ac38dd627d2c8f2eb71d3cae7d8165ac26d 100644 (file)
@@ -1,3 +1,10 @@
+2007-11-09  Paolo Carlini  <pcarlini@suse.de>
+
+       PR libstdc++/34032
+       * acinclude.m4 ([GLIBCXX_ENABLE_C99], [GLIBCXX_CHECK_C99_TR1]):
+       Use -std=c++98 instead of the default -std=gnu++98.
+       * configure: Regenerate.
+
 2007-11-08  Paolo Carlini  <pcarlini@suse.de>
 
        * config/io/basic_file_stdio.cc (fopen_mode): Add modes missing
index 2ca902fcd839c2dadb0d9afb1b48e7858ec70cb0..b85a2a8f1a3367dbe68a60b52e09e85a930e0a89 100644 (file)
@@ -763,9 +763,13 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
   AC_LANG_SAVE
   AC_LANG_CPLUSPLUS
 
-  # Use -fno-exceptions so that the C driver can link these tests without
-  # hitting undefined references to personality routines.
+  # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
+  # undefined and fake C99 facilities - like pre-standard snprintf - may be
+  # spuriously enabled.
+  # Long term, -std=c++0x could be even better, could manage to explicitely
+  # request C99 facilities to the underlying C headers.
   ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -std=c++98"
   ac_save_LIBS="$LIBS"
   ac_save_gcc_no_link="$gcc_no_link"
 
@@ -996,6 +1000,11 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [
   AC_LANG_SAVE
   AC_LANG_CPLUSPLUS
 
+  # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
+  # undefined and fake C99 facilities may be spuriously enabled.
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -std=c++98"
+
   # Check for the existence of <complex.h> complex math functions used
   # by tr1/complex.
   AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no)
@@ -1266,6 +1275,7 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [
   # Check for the existence of the <stdbool.h> header. 
   AC_CHECK_HEADERS(stdbool.h)
 
+  CXXFLAGS="$ac_save_CXXFLAGS"
   AC_LANG_RESTORE
 ])
 
index 96ca8bb1665eeadaf75918049aa2aebd9e2a324b..5e57fd651c6e11bcf872357b51db5f9ca0bd7418 100755 (executable)
@@ -15436,9 +15436,13 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
-  # Use -fno-exceptions so that the C driver can link these tests without
-  # hitting undefined references to personality routines.
+  # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
+  # undefined and fake C99 facilities - like pre-standard snprintf - may be
+  # spuriously enabled.
+  # Long term, -std=c++0x could be even better, could manage to explicitely
+  # request C99 facilities to the underlying C headers.
   ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -std=c++98"
   ac_save_LIBS="$LIBS"
   ac_save_gcc_no_link="$gcc_no_link"
 
@@ -17778,7 +17782,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
   # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
     cat > conftest.$ac_ext << EOF
-#line 17781 "configure"
+#line 17785 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -39527,6 +39531,11 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
+  # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
+  # undefined and fake C99 facilities may be spuriously enabled.
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -std=c++98"
+
   # Check for the existence of <complex.h> complex math functions used
   # by tr1/complex.
 
@@ -40544,6 +40553,7 @@ fi
 done
 
 
+  CXXFLAGS="$ac_save_CXXFLAGS"
   ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
This page took 0.139505 seconds and 5 git commands to generate.