summaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-26 06:48:04 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-26 06:48:04 +0000
commit8d67b0c767f6380d1902e5ff0542224207e5c857 (patch)
tree00635526408f5a8afab0c6d530277fa3049ecc5e /gcc/c-family
parent995ca335fd344920ac95f3dcc5a95897a2dce0d4 (diff)
downloadgcc-8d67b0c767f6380d1902e5ff0542224207e5c857.tar.gz
PR pch/47430
* c-opts.c (c_common_post_options): Call c_common_no_more_pch after init_c_lex if pch_file is set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169276 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/c-family/c-opts.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 30c1ea06122..9f88e975429 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,9 @@
+2011-01-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR pch/47430
+ * c-opts.c (c_common_post_options): Call c_common_no_more_pch
+ after init_c_lex if pch_file is set.
+
2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
PR c++/43601
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index befd64498a4..8d6e6e7e243 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -1,5 +1,5 @@
/* C/ObjC/C++ command line option handling.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Contributed by Neil Booth.
@@ -995,6 +995,12 @@ c_common_post_options (const char **pfilename)
{
init_c_lex ();
+ /* When writing a PCH file, avoid reading some other PCH file,
+ because the default address space slot then can't be used
+ for the output PCH file. */
+ if (pch_file)
+ c_common_no_more_pch ();
+
/* Yuk. WTF is this? I do know ObjC relies on it somewhere. */
input_location = UNKNOWN_LOCATION;
}