This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3] libstdc++/21769: add add_options_for_no_pch and use it in c99_classification_macros_c.cc
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- Cc: Paolo Carlini <paolo dot carlini at oracle dot com>, libstdc++ <libstdc++ at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 22 Feb 2010 13:20:52 -0800
- Subject: Re: [v3] libstdc++/21769: add add_options_for_no_pch and use it in c99_classification_macros_c.cc
- References: <4B56F135.70907@oracle.com> <Pine.GSO.4.58.1002192018540.3093@caipclassic.rutgers.edu>
On Fri, 2010-02-19 at 20:21 -0500, Kaveh R. GHAZI wrote:
> On Wed, 20 Jan 2010, Paolo Carlini wrote:
>
> > Hi,
> >
> > I decided to go ahead for now with the simple solution suggested by
> > Janis, which allows to clean up the spurious xpass of
> > c99_classification_macros_c.cc with PCHs which we have been seeing for
> > way too much time.
>
> Tested via "make check" on 4.4 and 4.3 branches on
> x86_64-unknown-linux-gnu. (Both branch patches below.)
>
> Ok to backport for 4.4 and 4.3?
>
> Thanks
> --Kaveh
OK.
Janis
>
> 2010-02-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
>
> Backport:
> 2010-01-20 Janis Johnson <janis187@us.ibm.com>
> Paolo Carlini <paolo.carlini@oracle.com>
>
> PR libstdc++/21769
> * testsuite/lib/dg-options.exp (add_options_for_no_pch): Add.
> * testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
> Use it.
>
> diff -rup orig/egcc-4.4-SVN20100219/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc egcc-4.4-SVN20100219/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc
> --- orig/egcc-4.4-SVN20100219/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc 2009-04-10 02:10:46.000000000 +0200
> +++ egcc-4.4-SVN20100219/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc 2010-02-19 18:10:01.000000000 +0100
> @@ -1,6 +1,6 @@
> // 2001-04-06 gdr
>
> -// Copyright (C) 2001, 2005, 2009 Free Software Foundation, Inc.
> +// Copyright (C) 2001, 2005, 2009, 2010 Free Software Foundation, Inc.
> //
> // This file is part of the GNU ISO C++ Library. This library is free
> // software; you can redistribute it and/or modify it under the
> @@ -17,8 +17,9 @@
> // with this library; see the file COPYING3. If not see
> // <http://www.gnu.org/licenses/>.
>
> -
> // { dg-do compile }
> +// { dg-add-options no_pch }
> +
> // { dg-xfail-if "" { { *-*-linux* *-*-darwin[3-7]* } || { uclibc || newlib } } { "*" } { "" } }
> // { dg-excess-errors "" { target { { *-*-linux* *-*-darwin[3-7]* } || { uclibc || newlib } } } }
>
> diff -rup orig/egcc-4.4-SVN20100219/libstdc++-v3/testsuite/lib/dg-options.exp egcc-4.4-SVN20100219/libstdc++-v3/testsuite/lib/dg-options.exp
> --- orig/egcc-4.4-SVN20100219/libstdc++-v3/testsuite/lib/dg-options.exp 2009-04-10 02:11:00.000000000 +0200
> +++ egcc-4.4-SVN20100219/libstdc++-v3/testsuite/lib/dg-options.exp 2010-02-19 18:10:01.000000000 +0100
> @@ -1,6 +1,6 @@
> # Handlers for additional dg-xxx keywords in tests.
>
> -# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
> +# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
> # Free Software Foundation, Inc.
> #
> # This program is free software; you can redistribute it and/or modify
> @@ -142,3 +142,8 @@ proc dg-require-string-conversions { arg
> }
> return
> }
> +
> +proc add_options_for_no_pch { flags } {
> + # This forces any generated and possibly included PCH to be invalid.
> + return "-D__GLIBCXX__=99999999"
> +}
>
>
>
>
>
>
>
>
>
> 2010-02-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
>
> Backport:
> 2010-01-20 Janis Johnson <janis187@us.ibm.com>
> Paolo Carlini <paolo.carlini@oracle.com>
>
> PR libstdc++/21769
> * testsuite/lib/dg-options.exp (add_options_for_no_pch): Add.
> * testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
> Use it.
>
> diff -rup orig/egcc-4.3-SVN20100219/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc egcc-4.3-SVN20100219/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc
> --- orig/egcc-4.3-SVN20100219/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc 2008-03-14 00:58:34.000000000 +0100
> +++ egcc-4.3-SVN20100219/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc 2010-02-19 18:13:04.000000000 +0100
> @@ -1,6 +1,6 @@
> // 2001-04-06 gdr
>
> -// Copyright (C) 2001, 2005 Free Software Foundation, Inc.
> +// Copyright (C) 2001, 2005, 2010 Free Software Foundation, Inc.
> //
> // This file is part of the GNU ISO C++ Library. This library is free
> // software; you can redistribute it and/or modify it under the
> @@ -28,6 +28,8 @@
> // the GNU General Public License.
>
> // { dg-do compile }
> +// { dg-add-options no_pch }
> +
> // { dg-xfail-if "" { { *-*-linux* *-*-darwin* } || { uclibc || newlib } } { "*" } { "" } }
> // { dg-excess-errors "" { target { { *-*-linux* *-*-darwin* } || { uclibc || newlib } } } }
>
> diff -rup orig/egcc-4.3-SVN20100219/libstdc++-v3/testsuite/lib/dg-options.exp egcc-4.3-SVN20100219/libstdc++-v3/testsuite/lib/dg-options.exp
> --- orig/egcc-4.3-SVN20100219/libstdc++-v3/testsuite/lib/dg-options.exp 2008-03-14 00:58:12.000000000 +0100
> +++ egcc-4.3-SVN20100219/libstdc++-v3/testsuite/lib/dg-options.exp 2010-02-19 18:12:05.000000000 +0100
> @@ -1,6 +1,6 @@
> # Handlers for additional dg-xxx keywords in tests.
>
> -# Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
> +# Copyright (C) 2004, 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
> #
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> @@ -88,3 +88,8 @@ proc dg-require-rvalref { args } {
> }
> return
> }
> +
> +proc add_options_for_no_pch { flags } {
> + # This forces any generated and possibly included PCH to be invalid.
> + return "-D__GLIBCXX__=99999999"
> +}