public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/19290] New: -M output different with -g
@ 2005-01-06 13:14 papadopo at shfj dot cea dot fr
  2005-01-06 14:18 ` [Bug preprocessor/19290] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: papadopo at shfj dot cea dot fr @ 2005-01-06 13:14 UTC (permalink / raw)
  To: gcc-bugs

In gcc 3.4, option -M outputs different rules when used with -g:

$ cat foo.c
#include <foo.h>
$ 
$ touch foo.h
$ 
$ gcc -M -I. foo.c
foo.o: foo.c foo.h
$ 
$ gcc -g -M -I. foo.c
# 1 "/home/user//"
foo.o: foo.c ./foo.h
$ 

This was not the case with gcc 3.3. While the output is arguably correct since
'#' is a valid comment in a Makefile, there are a few problems with this change:

1) Is it useful in any way? If not, it should be avoided since it can break things.

2) Actually it does break things. It breaks dependency generation as described
in the GNU manual or other better sources:
http://www.gnu.org/software/make/manual/html_node/make_47.html
http://make.paulandlesley.org/autodep.html

3) Also why output 'foo.h' without -g and './foo.h' with -g? This is inconsistent.

Therefore I see this as a 3.4 regression.

-- 
           Summary: -M output different with -g
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: papadopo at shfj dot cea dot fr
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug preprocessor/19290] -M output different with -g
  2005-01-06 13:14 [Bug preprocessor/19290] New: -M output different with -g papadopo at shfj dot cea dot fr
@ 2005-01-06 14:18 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-06 14:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-06 14:18 -------
I knew I had saw this before.  This is a dup of bug 17651 which is fixed 3.4.4.

*** This bug has been marked as a duplicate of 17651 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2005-01-06 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-06 13:14 [Bug preprocessor/19290] New: -M output different with -g papadopo at shfj dot cea dot fr
2005-01-06 14:18 ` [Bug preprocessor/19290] " pinskia at gcc dot gnu dot org

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).