public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14933] New: missing pre-compiled header depends with -MD
@ 2004-04-13  4:21 dfries at mail dot win dot org
  2004-04-13  4:27 ` [Bug pch/14933] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: dfries at mail dot win dot org @ 2004-04-13  4:21 UTC (permalink / raw)
  To: gcc-bugs

When using a pre-compiled header the option -MD produces no
dependencies on the pre-compiled header or the headers that the
pre-compiled header is composed of.  I would expect the same problem
on any of the dependency generating options.

SpacedOut:/tmp/test$ gcc -MD headers.h  -o headers.h.gch
SpacedOut:/tmp/test$ cat headers.h.d 
headers.h.gch: headers.h

> so far so good

SpacedOut:/tmp/test$ gcc -MD main.c -o main 
SpacedOut:/tmp/test$ cat main.d
main: main.c

> So main doesn't require anything?  I don't think so.

SpacedOut:/tmp/test$ rm -f *.d *.i *.s a.out *.gch main
SpacedOut:/tmp/test$ gcc -MD main.c -o main 
SpacedOut:/tmp/test$ cat main.d
main: main.c headers.h

> Much better.  I would think it should be the following when using
> the precompiled headers.
main: main.c headers.h.gch

SpacedOut:/tmp/test$ gcc -v
Reading specs from /home/david/WorkProjects/OpenSceneGraph/DevelGcc/install/lib/gcc/i686-pc-linux-gnu/3.5.0/specs
Configured with: ../gcc_src/configure --enable-languages=c++ --prefix=/home/david/WorkProjects/OpenSceneGraph/DevelGcc/install 
--exec-prefix=/home/david/WorkProjects/OpenSceneGraph/DevelGcc/install
Thread model: posix
gcc version 3.5.0 20040412 (experimental)


header.h:
#ifndef _HEADERS_H
#define _HEADERS_H 1
const int value=32;
#endif /* _HEADERS_H */

main.c:
#include "headers.h"

int main(int argc, char ** argv)
{
        return value;
}

-- 
           Summary: missing pre-compiled header depends with -MD
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dfries at mail dot win dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-linux
  GCC host triplet: i386-linux
GCC target triplet: i386-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug pch/14933] missing pre-compiled header depends with -MD
  2004-04-13  4:21 [Bug c/14933] New: missing pre-compiled header depends with -MD dfries at mail dot win dot org
@ 2004-04-13  4:27 ` pinskia at gcc dot gnu dot org
  2004-04-13 19:01 ` geoffk at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-13  4:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-13 04:21 -------
Confirmed, related to PR 14238.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
          Component|c                           |pch
     Ever Confirmed|                            |1
  GCC build triplet|i386-linux                  |
   GCC host triplet|i386-linux                  |
 GCC target triplet|i386-linux                  |
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-13 04:21:01
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug pch/14933] missing pre-compiled header depends with -MD
  2004-04-13  4:21 [Bug c/14933] New: missing pre-compiled header depends with -MD dfries at mail dot win dot org
  2004-04-13  4:27 ` [Bug pch/14933] " pinskia at gcc dot gnu dot org
@ 2004-04-13 19:01 ` geoffk at gcc dot gnu dot org
  2004-04-17  8:43 ` geoffk at gcc dot gnu dot org
  2004-12-14 13:19 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 14+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2004-04-13 19:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From geoffk at gcc dot gnu dot org  2004-04-13 18:38 -------
This worked with Apple's gcc 3.3.  It would be helpful to know when it broke.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug pch/14933] missing pre-compiled header depends with -MD
  2004-04-13  4:21 [Bug c/14933] New: missing pre-compiled header depends with -MD dfries at mail dot win dot org
  2004-04-13  4:27 ` [Bug pch/14933] " pinskia at gcc dot gnu dot org
  2004-04-13 19:01 ` geoffk at gcc dot gnu dot org
@ 2004-04-17  8:43 ` geoffk at gcc dot gnu dot org
  2004-12-14 13:19 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 14+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2004-04-17  8:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From geoffk at gcc dot gnu dot org  2004-04-17 08:04 -------
It seems to be caused by Neil's cppfiles.c rewrite, in particular with CVS HEAD as of 2003-07-29 22:20:
00 UTC, main.d says

main: main.c headers.h.gch

and as of 2003-07-29 22:35:00 UTC, main.d says:

main: main.c headers.h

and the only change between those two times was Neil's change.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |neil at daikokuya dot co dot
                   |                            |uk


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug pch/14933] missing pre-compiled header depends with -MD
  2004-04-13  4:21 [Bug c/14933] New: missing pre-compiled header depends with -MD dfries at mail dot win dot org
                   ` (2 preceding siblings ...)
  2004-04-17  8:43 ` geoffk at gcc dot gnu dot org
@ 2004-12-14 13:19 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-14 13:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-14 13:18 -------
*** Bug 18980 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trick at icculus dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug pch/14933] missing pre-compiled header depends with -MD
       [not found] <bug-14933-8321@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2008-11-03 22:35 ` pinskia at gcc dot gnu dot org
@ 2010-06-04 20:11 ` kristiaan dot lenaerts at gmail dot com
  8 siblings, 0 replies; 14+ messages in thread
From: kristiaan dot lenaerts at gmail dot com @ 2010-06-04 20:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from kristiaan dot lenaerts at gmail dot com  2010-06-04 20:10 -------
Created an attachment (id=20847)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20847&action=view)
Updated fix for improper PCH dependency tracking

I got hit by this bug a few weeks ago when working on a C++ project. This
project has a setup for which using -fpch-deps will not work, most pch files
include local headers that have to be referenced by their complete path
elsewhere. 

I rebased the proposed fix from Mario on the 4.5 branch (I created it when 4.5
was not yet out). I'm using this patch for about a month now without any
obvious problems, but I would like to get this in mainline.

What are the steps that I should take? I have not yet run the testsuite. (this
is on a corporate laptop running under cygwin - windows XP and full
hd-encryption - so compiling gcc was painfull, and I imagine running the
testsuite will be worse)
Would it be ok if I run the testsuite on cygwin with and without the patch, and
if the results are the same submit this patch to gcc-patches (with meaningfull
changelog entry)? I could also test on a x64_64-pc-linux-gnu machine at home,
but it could take a while before I can test there.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug pch/14933] missing pre-compiled header depends with -MD
       [not found] <bug-14933-8321@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2008-04-20 23:56 ` pedz at easesoftware dot com
@ 2008-11-03 22:35 ` pinskia at gcc dot gnu dot org
  2010-06-04 20:11 ` kristiaan dot lenaerts at gmail dot com
  8 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-11-03 22:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from pinskia at gcc dot gnu dot org  2008-11-03 22:33 -------
Any news on this patch?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug pch/14933] missing pre-compiled header depends with -MD
       [not found] <bug-14933-8321@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2008-04-20 19:00 ` tromey at gcc dot gnu dot org
@ 2008-04-20 23:56 ` pedz at easesoftware dot com
  2008-11-03 22:35 ` pinskia at gcc dot gnu dot org
  2010-06-04 20:11 ` kristiaan dot lenaerts at gmail dot com
  8 siblings, 0 replies; 14+ messages in thread
From: pedz at easesoftware dot com @ 2008-04-20 23:56 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1912 bytes --]



------- Comment #11 from pedz at easesoftware dot com  2008-04-20 23:56 -------
Subject: Re:  missing pre-compiled header depends with -MD

This message has been marked as "junk" or "spam".  There is a very  
good chance that I will not read it.  So, please send this message  
again but add the word "magic special code" without the spaces (all  
one word) in the message and it is suppose to slip through and get to  
me.


On Apr 20, 2008, at 1:59 PM, "tromey at gcc dot gnu dot org"
<gcc-bugzilla@gcc.gnu.org 
 > wrote:

>
>
> ------- Comment #10 from tromey at gcc dot gnu dot org  2008-04-20  
> 18:59 -------
> FYI -- when I tried this on the compile farm tester, it caused a  
> couple
> regressions.  I'll redo it at some point and post the results here.
>
>
> -- 
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933
>
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
>
This message has been marked as "junk" or "spam".  There is a very
good chance that I will not read it.  So, please send this message
again but add the word "magic special code" without the spaces (all
one word) in the message and it is suppose to slip through and get to
me.



On Apr 20, 2008, at 1:59 PM, "tromey at gcc dot gnu dot org"
<<gcc-bugzilla@gcc.gnu.org> wrote:


<excerpt><fontfamily><param>Times</param><bigger><bigger>


------- Comment #10 from tromey at gcc dot gnu dot org  2008-04-20
18:59 -------

FYI -- when I tried this on the compile farm tester, it caused a couple

regressions.  I'll redo it at some point and post the results here.



-- 



http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


------- You are receiving this mail because: -------

You are on the CC list for the bug, or are watching someone who is.


</bigger></bigger></fontfamily></excerpt>


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug pch/14933] missing pre-compiled header depends with -MD
       [not found] <bug-14933-8321@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2008-03-14 21:26 ` tromey at gcc dot gnu dot org
@ 2008-04-20 19:00 ` tromey at gcc dot gnu dot org
  2008-04-20 23:56 ` pedz at easesoftware dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-04-20 19:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from tromey at gcc dot gnu dot org  2008-04-20 18:59 -------
FYI -- when I tried this on the compile farm tester, it caused a couple
regressions.  I'll redo it at some point and post the results here.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug pch/14933] missing pre-compiled header depends with -MD
       [not found] <bug-14933-8321@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2007-11-28 19:07 ` tromey at gcc dot gnu dot org
@ 2008-03-14 21:26 ` tromey at gcc dot gnu dot org
  2008-04-20 19:00 ` tromey at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-03-14 21:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from tromey at gcc dot gnu dot org  2008-03-14 21:25 -------
I'm testing this patch.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |tromey at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-07-07 13:36:12         |2008-03-14 21:26:00
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug pch/14933] missing pre-compiled header depends with -MD
       [not found] <bug-14933-8321@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2007-01-27 20:03 ` tromey at gcc dot gnu dot org
@ 2007-11-28 19:07 ` tromey at gcc dot gnu dot org
  2008-03-14 21:26 ` tromey at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-11-28 19:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from tromey at gcc dot gnu dot org  2007-11-28 19:07 -------
*** Bug 33473 has been marked as a duplicate of this bug. ***


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rswan at signetic dot ca


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug pch/14933] missing pre-compiled header depends with -MD
       [not found] <bug-14933-8321@http.gcc.gnu.org/bugzilla/>
  2006-03-20 19:40 ` pedz at easesoftware dot net
  2006-07-25 15:23 ` mjuric at astro dot princeton dot edu
@ 2007-01-27 20:03 ` tromey at gcc dot gnu dot org
  2007-11-28 19:07 ` tromey at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-27 20:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from tromey at gcc dot gnu dot org  2007-01-27 20:03 -------
This patch looks reasonable to me, though I cannot approve it.
The formatting is slightly wrong, there should be a space
between the "if" and the "(".
Also a ChangeLog entry is required.


-- 

tromey 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=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug pch/14933] missing pre-compiled header depends with -MD
       [not found] <bug-14933-8321@http.gcc.gnu.org/bugzilla/>
  2006-03-20 19:40 ` pedz at easesoftware dot net
@ 2006-07-25 15:23 ` mjuric at astro dot princeton dot edu
  2007-01-27 20:03 ` tromey at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: mjuric at astro dot princeton dot edu @ 2006-07-25 15:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mjuric at astro dot princeton dot edu  2006-07-25 15:22 -------
Created an attachment (id=11935)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11935&action=view)
Proposed fix for improper dependency tracking with PCHs

This short patch addresses the issue of precompiled header dependencies not
being recorded during -MD pass. The problem appeared because deps_add_dep() was
never called from _cpp_stack_file, as all of .gch handling is done in
should_stack_file().

The patch fixes it by calling deps_add_dep() in should_stack_file(), if the
file under consideration is a precompiled header, and if restoration of
dependencies from .gch has not been requested (restore_pch_deps == false).

Applies to HEAD as well as 4.1.1.

PS: This revealed a separate issue with counterintuitive behavior of
restore_pch_deps == true (no dependencies shown), which I'll submit as a
separate bug and proposed patch.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug pch/14933] missing pre-compiled header depends with -MD
       [not found] <bug-14933-8321@http.gcc.gnu.org/bugzilla/>
@ 2006-03-20 19:40 ` pedz at easesoftware dot net
  2006-07-25 15:23 ` mjuric at astro dot princeton dot edu
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: pedz at easesoftware dot net @ 2006-03-20 19:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pedz at easesoftware dot net  2006-03-20 19:40 -------
This is also on 4.0.2.

This is marked as Serverity of "enhancement".  Can we change that to "normal"?


-- 

pedz at easesoftware dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pedz at easesoftware dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-06-04 20:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-13  4:21 [Bug c/14933] New: missing pre-compiled header depends with -MD dfries at mail dot win dot org
2004-04-13  4:27 ` [Bug pch/14933] " pinskia at gcc dot gnu dot org
2004-04-13 19:01 ` geoffk at gcc dot gnu dot org
2004-04-17  8:43 ` geoffk at gcc dot gnu dot org
2004-12-14 13:19 ` pinskia at gcc dot gnu dot org
     [not found] <bug-14933-8321@http.gcc.gnu.org/bugzilla/>
2006-03-20 19:40 ` pedz at easesoftware dot net
2006-07-25 15:23 ` mjuric at astro dot princeton dot edu
2007-01-27 20:03 ` tromey at gcc dot gnu dot org
2007-11-28 19:07 ` tromey at gcc dot gnu dot org
2008-03-14 21:26 ` tromey at gcc dot gnu dot org
2008-04-20 19:00 ` tromey at gcc dot gnu dot org
2008-04-20 23:56 ` pedz at easesoftware dot com
2008-11-03 22:35 ` pinskia at gcc dot gnu dot org
2010-06-04 20:11 ` kristiaan dot lenaerts at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).