From d8fad4ea49a49a7787891d1a6e7dbb81e2a09572 Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Fri, 28 Feb 2003 23:06:10 +0000 Subject: [PATCH] In gcc/: 2003-02-28 Geoffrey Keating In gcc/: 2003-02-28 Geoffrey Keating * doc/invoke.texi: Change .pch to .gch. * cppfiles.c (open_file_pch): Likewise. * gcc.c (default_compilers): Likewise. In gcc/testsuite/: 2003-02-28 Geoffrey Keating * gcc.dg/pch/pch.exp: Change .pch to .gch. * g++.dg/pch/pch.exp: Likewise. From-SVN: r63587 --- gcc/ChangeLog | 6 ++++++ gcc/cppfiles.c | 4 ++-- gcc/doc/invoke.texi | 6 +++--- gcc/gcc.c | 4 ++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/pch/pch.exp | 14 +++++++------- gcc/testsuite/gcc.dg/pch/pch.exp | 16 ++++++++-------- 7 files changed, 33 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9554dfb16e8e..9a4e99cae614 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-02-28 Geoffrey Keating + + * doc/invoke.texi: Change .pch to .gch. + * cppfiles.c (open_file_pch): Likewise. + * gcc.c (default_compilers): Likewise. + 2003-02-28 Aldy Hernandez * floatlib.c: Remove. diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 203619f30b8c..1f5d6c3de51f 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -1,5 +1,5 @@ /* Part of CPP library. (include file handling) - Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1998, + Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1998, 2003, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Per Bothner, 1994. Based on CCCP program by Paul Rubin, June 1986 @@ -362,7 +362,7 @@ open_file_pch (pfile, filename) splay_tree_node nd; memcpy (pchname, filename, namelen); - memcpy (pchname + namelen, ".pch", 5); + memcpy (pchname + namelen, ".gch", 5); nd = find_or_create_entry (pfile, pchname); file = (struct include_file *) nd->value; diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 747f00369573..90790df59af7 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -11251,11 +11251,11 @@ seen in the compilation. As it searches for the included file (@pxref{Search Path,,Search Path,cpp.info,The C Preprocessor}) the compiler looks for a precompiled header in each directory just before it looks for the include file in that directory. The name searched for is -the name specified in the @code{#include} with @samp{.pch} appended. If +the name specified in the @code{#include} with @samp{.gch} appended. If the precompiled header file can't be used, it is ignored. For instance, if you have @code{#include "all.h"}, and you have -@file{all.h.pch} in the same directory as @file{all.h}, then the +@file{all.h.gch} in the same directory as @file{all.h}, then the precompiled header file will be used if possible, and the original header will be used otherwise. @@ -11276,7 +11276,7 @@ they've already been included (in the precompiled header). If you need to precompile the same header file for different languages, targets, or compiler options, you can instead make a -@emph{directory} named like @file{all.h.pch}, and put each precompiled +@emph{directory} named like @file{all.h.gch}, and put each precompiled header in the directory. (It doesn't matter what you call the files in the directory, every precompiled header in the directory will be considered.) The first precompiled header encountered in the diff --git a/gcc/gcc.c b/gcc/gcc.c index 7c344c925553..db37242dd0c4 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -929,11 +929,11 @@ static const struct compiler default_compilers[] = %{save-temps|traditional-cpp:%(trad_capable_cpp) \ %(cpp_options) %b.i \n\ cc1 -fpreprocessed %b.i %(cc1_options)\ - -o %g.s %{!o*:--output-pch=%i.pch}\ + -o %g.s %{!o*:--output-pch=%i.gch}\ %W{o*:--output-pch=%*}%V}\ %{!save-temps:%{!traditional-cpp:\ cc1 %(cpp_unique_options) %(cc1_options)\ - -o %g.s %{!o*:--output-pch=%i.pch}\ + -o %g.s %{!o*:--output-pch=%i.gch}\ %W{o*:--output-pch=%*}%V}}}}}", 0}, {".i", "@cpp-output", 0}, {"@cpp-output", diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ac2985ca8240..96d3d97335a4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-02-28 Geoffrey Keating + + * gcc.dg/pch/pch.exp: Change .pch to .gch. + * g++.dg/pch/pch.exp: Likewise. + 2003-02-28 Mark Mitchell PR c++/9879 diff --git a/gcc/testsuite/g++.dg/pch/pch.exp b/gcc/testsuite/g++.dg/pch/pch.exp index 7a05c74b5abf..bf2dab4af908 100644 --- a/gcc/testsuite/g++.dg/pch/pch.exp +++ b/gcc/testsuite/g++.dg/pch/pch.exp @@ -36,9 +36,9 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.C]] { set nshort [file tail [file dirname $test]]/[file tail $test] set bname "[file rootname [file tail $test]]" - catch { file delete "$bname.H.pch" } + catch { file delete "$bname.H.gch" } catch { file delete "$bname.s" } - catch { file delete "$bname.s-pch" } + catch { file delete "$bname.s-gch" } # We don't try to use the loop-optimizing options, since they are highly # unlikely to make any difference to PCH. @@ -54,17 +54,17 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.C]] { # For the rest, the default is to compile to .s. set dg-do-what-default compile - if { [ file exists "$bname.H.pch" ] } { + if { [ file exists "$bname.H.gch" ] } { # Ensure that the PCH file is used, not the original header. file delete "$bname.H" dg-test -keep-output $test $flags "-I." - file delete "$bname.H.pch" + file delete "$bname.H.gch" if { [ file exists "$bname.s" ] } { - file rename "$bname.s" "$bname.s-pch" + file rename "$bname.s" "$bname.s-gch" file copy "[file rootname $test].Hs" "$bname.H" dg-test -keep-output $test $flags "-I." - set tmp [ diff "$bname.s" "$bname.s-pch" ] + set tmp [ diff "$bname.s" "$bname.s-gch" ] if { $tmp == 0 } { untested "$nshort $flags assembly comparison" } elseif { $tmp == 1 } { @@ -74,7 +74,7 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.C]] { } file delete "$bname.H" file delete "$bname.s" - file delete "$bname.s-pch" + file delete "$bname.s-gch" } else { untested "$nshort $flags assembly comparison" } diff --git a/gcc/testsuite/gcc.dg/pch/pch.exp b/gcc/testsuite/gcc.dg/pch/pch.exp index 2c817fb51c8a..7a5aacaac569 100644 --- a/gcc/testsuite/gcc.dg/pch/pch.exp +++ b/gcc/testsuite/gcc.dg/pch/pch.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2002 Free Software Foundation, Inc. +# Copyright (C) 1997, 2002, 2003 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 @@ -36,9 +36,9 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.c]] { set nshort [file tail [file dirname $test]]/[file tail $test] set bname "[file rootname [file tail $test]]" - catch { file delete "$bname.h.pch" } + catch { file delete "$bname.h.gch" } catch { file delete "$bname.s" } - catch { file delete "$bname.s-pch" } + catch { file delete "$bname.s-gch" } # We don't try to use the loop-optimizing options, since they are highly # unlikely to make any difference to PCH. @@ -54,17 +54,17 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.c]] { # For the rest, the default is to compile to .s. set dg-do-what-default compile - if { [ file exists "$bname.h.pch" ] } { + if { [ file exists "$bname.h.gch" ] } { # Ensure that the PCH file is used, not the original header. file delete "$bname.h" dg-test -keep-output $test $flags "-I." - file delete "$bname.h.pch" + file delete "$bname.h.gch" if { [ file exists "$bname.s" ] } { - file rename "$bname.s" "$bname.s-pch" + file rename "$bname.s" "$bname.s-gch" file copy "[file rootname $test].hs" "$bname.h" dg-test -keep-output $test $flags "-I." - set tmp [ diff "$bname.s" "$bname.s-pch" ] + set tmp [ diff "$bname.s" "$bname.s-gch" ] if { $tmp == 0 } { untested "$nshort $flags assembly comparison" } elseif { $tmp == 1 } { @@ -74,7 +74,7 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.c]] { } file delete "$bname.h" file delete "$bname.s" - file delete "$bname.s-pch" + file delete "$bname.s-gch" } else { untested "$nshort $flags assembly comparison" } -- 2.47.2