* [Bug pch/36649] [4.3/4.4 Regression] -H option doesn't work as expected
2008-06-27 10:29 [Bug pch/36649] New: [4.3 Regression] -H option doesn't work as expected rbuergel at web dot de
@ 2008-07-04 21:53 ` jsm28 at gcc dot gnu dot org
2008-07-18 16:56 ` [Bug preprocessor/36649] " rguenth at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 21:53 UTC (permalink / raw)
To: gcc-bugs
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.3 Regression] -H option |[4.3/4.4 Regression] -H
|doesn't work as expected |option doesn't work as
| |expected
Target Milestone|--- |4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36649
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/36649] [4.3/4.4 Regression] -H option doesn't work as expected
2008-06-27 10:29 [Bug pch/36649] New: [4.3 Regression] -H option doesn't work as expected rbuergel at web dot de
2008-07-04 21:53 ` [Bug pch/36649] [4.3/4.4 " jsm28 at gcc dot gnu dot org
@ 2008-07-18 16:56 ` rguenth at gcc dot gnu dot org
2008-07-29 20:47 ` jakub at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-07-18 16:56 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|pch |preprocessor
Priority|P3 |P2
Version|4.2.4 |4.3.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36649
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/36649] [4.3/4.4 Regression] -H option doesn't work as expected
2008-06-27 10:29 [Bug pch/36649] New: [4.3 Regression] -H option doesn't work as expected rbuergel at web dot de
2008-07-04 21:53 ` [Bug pch/36649] [4.3/4.4 " jsm28 at gcc dot gnu dot org
2008-07-18 16:56 ` [Bug preprocessor/36649] " rguenth at gcc dot gnu dot org
@ 2008-07-29 20:47 ` jakub at gcc dot gnu dot org
2008-07-29 21:27 ` tromey at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-07-29 20:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2008-07-29 20:46 -------
This is caused by http://gcc.gnu.org/ml/gcc-patches/2007-09/msg00396.html
patch, in particular changing line_table from a structure into a pointer into
GC allocated structure. Although push_command_line_include sets
line_table->trace_includes to cpp_opts->print_include_names, after that when
the *.gch file is read line_table will point to a different structure (the one
read
from the *.gch file) and thus it will use the -H vs. non-H setting from *.gch
compilation instead of the current compilation.
I don't know why line_table was changed into a pointer, but if that's needed,
I guess we want to save the line_table->trace_includes setting before reading
pch (or in push_command_line_include) and set it in the new structure after
PCH is read.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36649
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/36649] [4.3/4.4 Regression] -H option doesn't work as expected
2008-06-27 10:29 [Bug pch/36649] New: [4.3 Regression] -H option doesn't work as expected rbuergel at web dot de
` (2 preceding siblings ...)
2008-07-29 20:47 ` jakub at gcc dot gnu dot org
@ 2008-07-29 21:27 ` tromey at gcc dot gnu dot org
2008-07-29 22:36 ` jakub at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-07-29 21:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tromey at gcc dot gnu dot org 2008-07-29 21:26 -------
> I don't know why line_table was changed into a pointer
It was because PCH does not know how to write structs.
I agree with your analysis; we have to save that field
across PCH loading.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-07-29 21:26:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36649
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/36649] [4.3/4.4 Regression] -H option doesn't work as expected
2008-06-27 10:29 [Bug pch/36649] New: [4.3 Regression] -H option doesn't work as expected rbuergel at web dot de
` (3 preceding siblings ...)
2008-07-29 21:27 ` tromey at gcc dot gnu dot org
@ 2008-07-29 22:36 ` jakub at gcc dot gnu dot org
2008-07-30 9:26 ` jakub at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-07-29 22:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2008-07-29 22:36 -------
--- c-pch.c.jj42008-07-28 16:44:55.000000000 +0200
+++ c-pch.c2008-07-30 00:33:11.000000000 +0200
@@ -367,6 +367,7 @@ c_common_read_pch (cpp_reader *pfile, co
struct c_pch_header h;
struct save_macro_data *smd;
expanded_location saved_loc;
+ bool saved_trace_includes;
f = fdopen (fd, "rb");
if (f == NULL)
@@ -412,6 +413,7 @@ c_common_read_pch (cpp_reader *pfile, co
/* Save the location and then restore it after reading the PCH. */
saved_loc = expand_location (line_table->highest_line);
+ saved_trace_includes = line_table->trace_includes;
cpp_prepare_state (pfile, &smd);
@@ -425,6 +427,7 @@ c_common_read_pch (cpp_reader *pfile, co
fclose (f);
+ line_table->trace_includes = saved_trace_includes;
cpp_set_line_map (pfile, line_table);
linemap_add (line_table, LC_RENAME, 0, saved_loc.file, saved_loc.line);
seems to work, will test it tomorrow.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36649
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/36649] [4.3/4.4 Regression] -H option doesn't work as expected
2008-06-27 10:29 [Bug pch/36649] New: [4.3 Regression] -H option doesn't work as expected rbuergel at web dot de
` (4 preceding siblings ...)
2008-07-29 22:36 ` jakub at gcc dot gnu dot org
@ 2008-07-30 9:26 ` jakub at gcc dot gnu dot org
2008-07-31 8:02 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-07-30 9:26 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2008-07-29 21:26:45 |2008-07-30 09:25:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36649
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/36649] [4.3/4.4 Regression] -H option doesn't work as expected
2008-06-27 10:29 [Bug pch/36649] New: [4.3 Regression] -H option doesn't work as expected rbuergel at web dot de
` (5 preceding siblings ...)
2008-07-30 9:26 ` jakub at gcc dot gnu dot org
@ 2008-07-31 8:02 ` jakub at gcc dot gnu dot org
2008-07-31 8:47 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-07-31 8:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2008-07-31 08:00 -------
Subject: Bug 36649
Author: jakub
Date: Thu Jul 31 07:59:18 2008
New Revision: 138360
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138360
Log:
PR preprocessor/36649
* c-pch.c (c_common_read_pch): Save and restore
line_table->trace_includes across PCH restore.
* gcc.dg/pch/cpp-3.c: New test.
* gcc.dg/pch/cpp-3.hs: New file.
* gcc.dg/pch/cpp-3a.h: New file.
* gcc.dg/pch/cpp-3b.h: New file.
Added:
trunk/gcc/testsuite/gcc.dg/pch/cpp-3.c
trunk/gcc/testsuite/gcc.dg/pch/cpp-3.hs
trunk/gcc/testsuite/gcc.dg/pch/cpp-3a.h
trunk/gcc/testsuite/gcc.dg/pch/cpp-3b.h
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-pch.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36649
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/36649] [4.3/4.4 Regression] -H option doesn't work as expected
2008-06-27 10:29 [Bug pch/36649] New: [4.3 Regression] -H option doesn't work as expected rbuergel at web dot de
` (6 preceding siblings ...)
2008-07-31 8:02 ` jakub at gcc dot gnu dot org
@ 2008-07-31 8:47 ` jakub at gcc dot gnu dot org
2008-07-31 8:52 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-07-31 8:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jakub at gcc dot gnu dot org 2008-07-31 08:45 -------
Subject: Bug 36649
Author: jakub
Date: Thu Jul 31 08:44:24 2008
New Revision: 138368
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138368
Log:
PR preprocessor/36649
* c-pch.c (c_common_read_pch): Save and restore
line_table->trace_includes across PCH restore.
* gcc.dg/pch/cpp-3.c: New test.
* gcc.dg/pch/cpp-3.hs: New file.
* gcc.dg/pch/cpp-3a.h: New file.
* gcc.dg/pch/cpp-3b.h: New file.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pch/cpp-3.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pch/cpp-3.hs
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pch/cpp-3a.h
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pch/cpp-3b.h
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/c-pch.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36649
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/36649] [4.3/4.4 Regression] -H option doesn't work as expected
2008-06-27 10:29 [Bug pch/36649] New: [4.3 Regression] -H option doesn't work as expected rbuergel at web dot de
` (7 preceding siblings ...)
2008-07-31 8:47 ` jakub at gcc dot gnu dot org
@ 2008-07-31 8:52 ` jakub at gcc dot gnu dot org
2008-07-31 19:15 ` jakub at gcc dot gnu dot org
2008-07-31 19:17 ` jakub at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-07-31 8:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jakub at gcc dot gnu dot org 2008-07-31 08:51 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36649
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/36649] [4.3/4.4 Regression] -H option doesn't work as expected
2008-06-27 10:29 [Bug pch/36649] New: [4.3 Regression] -H option doesn't work as expected rbuergel at web dot de
` (8 preceding siblings ...)
2008-07-31 8:52 ` jakub at gcc dot gnu dot org
@ 2008-07-31 19:15 ` jakub at gcc dot gnu dot org
2008-07-31 19:17 ` jakub at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-07-31 19:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jakub at gcc dot gnu dot org 2008-07-31 19:13 -------
Subject: Bug 36649
Author: jakub
Date: Thu Jul 31 19:12:14 2008
New Revision: 138432
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138432
Log:
PR preprocessor/36649
* files.c (struct report_missing_guard_data): New type.
(report_missing_guard): Put paths into an array instead of printing
them right away. Return 1 rather than 0.
(report_missing_guard_cmp): New function.
(_cpp_report_missing_guards): Sort and print paths gathered by
report_missing_guard callback.
* gcc.dg/pch/cpp-3.hs: Add include guards.
* gcc.dg/pch/cpp-3a.h: Likewise.
* gcc.dg/pch/cpp-3b.h: Likewise.
* gcc.dg/cpp/mi8.c: New test.
* gcc.dg/cpp/mi8a.h: New file.
* gcc.dg/cpp/mi8b.h: New file.
* gcc.dg/cpp/mi8c.h: New file.
* gcc.dg/cpp/mi8d.h: New file.
Added:
trunk/gcc/testsuite/gcc.dg/cpp/mi8.c
trunk/gcc/testsuite/gcc.dg/cpp/mi8a.h
trunk/gcc/testsuite/gcc.dg/cpp/mi8b.h
trunk/gcc/testsuite/gcc.dg/cpp/mi8c.h
trunk/gcc/testsuite/gcc.dg/cpp/mi8d.h
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/pch/cpp-3.hs
trunk/gcc/testsuite/gcc.dg/pch/cpp-3a.h
trunk/gcc/testsuite/gcc.dg/pch/cpp-3b.h
trunk/libcpp/ChangeLog
trunk/libcpp/files.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36649
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/36649] [4.3/4.4 Regression] -H option doesn't work as expected
2008-06-27 10:29 [Bug pch/36649] New: [4.3 Regression] -H option doesn't work as expected rbuergel at web dot de
` (9 preceding siblings ...)
2008-07-31 19:15 ` jakub at gcc dot gnu dot org
@ 2008-07-31 19:17 ` jakub at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-07-31 19:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jakub at gcc dot gnu dot org 2008-07-31 19:16 -------
Subject: Bug 36649
Author: jakub
Date: Thu Jul 31 19:15:08 2008
New Revision: 138433
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138433
Log:
PR preprocessor/36649
* files.c (struct report_missing_guard_data): New type.
(report_missing_guard): Put paths into an array instead of printing
them right away. Return 1 rather than 0.
(report_missing_guard_cmp): New function.
(_cpp_report_missing_guards): Sort and print paths gathered by
report_missing_guard callback.
* gcc.dg/pch/cpp-3.hs: Add include guards.
* gcc.dg/pch/cpp-3a.h: Likewise.
* gcc.dg/pch/cpp-3b.h: Likewise.
* gcc.dg/cpp/mi8.c: New test.
* gcc.dg/cpp/mi8a.h: New file.
* gcc.dg/cpp/mi8b.h: New file.
* gcc.dg/cpp/mi8c.h: New file.
* gcc.dg/cpp/mi8d.h: New file.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/cpp/mi8.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/cpp/mi8a.h
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/cpp/mi8b.h
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/cpp/mi8c.h
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/cpp/mi8d.h
Modified:
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pch/cpp-3.hs
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pch/cpp-3a.h
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pch/cpp-3b.h
branches/gcc-4_3-branch/libcpp/ChangeLog
branches/gcc-4_3-branch/libcpp/files.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36649
^ permalink raw reply [flat|nested] 12+ messages in thread