public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paolo Carlini <pcarlini@suse.de>
To: Gcc Patch List <gcc-patches@gcc.gnu.org>
Subject: [v3] libstdc++/34032
Date: Fri, 09 Nov 2007 17:20:00 -0000	[thread overview]
Message-ID: <47348319.7050501@suse.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 132 bytes --]

Hi,

tested x86_64-linux and powerpc-darwin by me and cygwin by Eric Niebler,
committed to mainline.

Paolo.

/////////////////////

[-- Attachment #2: CL_34032 --]
[-- Type: text/plain, Size: 211 bytes --]

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.

[-- Attachment #3: patch_34032 --]
[-- Type: text/plain, Size: 1404 bytes --]

Index: acinclude.m4
===================================================================
--- acinclude.m4	(revision 130038)
+++ acinclude.m4	(working copy)
@@ -763,9 +763,13 @@
   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_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 @@
   # Check for the existence of the <stdbool.h> header.	
   AC_CHECK_HEADERS(stdbool.h)
 
+  CXXFLAGS="$ac_save_CXXFLAGS"
   AC_LANG_RESTORE
 ])
 

                 reply	other threads:[~2007-11-09 15:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47348319.7050501@suse.de \
    --to=pcarlini@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).