In gcc/: 2003-02-28 Geoffrey Keating <geoffk@apple.com>

In gcc/:
2003-02-28  Geoffrey Keating  <geoffk@apple.com>

	* 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  <geoffk@apple.com>

	* gcc.dg/pch/pch.exp: Change .pch to .gch.
	* g++.dg/pch/pch.exp: Likewise.

From-SVN: r63587
This commit is contained in:
Geoffrey Keating 2003-02-28 23:06:10 +00:00 committed by Geoffrey Keating
parent 9855905cef
commit d8fad4ea49
7 changed files with 33 additions and 22 deletions

View File

@ -1,3 +1,9 @@
2003-02-28 Geoffrey Keating <geoffk@apple.com>
* doc/invoke.texi: Change .pch to .gch.
* cppfiles.c (open_file_pch): Likewise.
* gcc.c (default_compilers): Likewise.
2003-02-28 Aldy Hernandez <aldyh@redhat.com>
* floatlib.c: Remove.

View File

@ -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;

View File

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

View File

@ -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",

View File

@ -1,3 +1,8 @@
2003-02-28 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/pch/pch.exp: Change .pch to .gch.
* g++.dg/pch/pch.exp: Likewise.
2003-02-28 Mark Mitchell <mark@codesourcery.com>
PR c++/9879

View File

@ -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"
}

View File

@ -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"
}