From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18949 invoked by alias); 6 Jan 2005 13:14:33 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 18930 invoked by uid 48); 6 Jan 2005 13:14:29 -0000 Date: Thu, 06 Jan 2005 13:14:00 -0000 From: "papadopo at shfj dot cea dot fr" To: gcc-bugs@gcc.gnu.org Message-ID: <20050106131427.19290.papadopo@shfj.cea.fr> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug preprocessor/19290] New: -M output different with -g X-Bugzilla-Reason: CC X-SW-Source: 2005-01/txt/msg00607.txt.bz2 List-Id: In gcc 3.4, option -M outputs different rules when used with -g: $ cat foo.c #include $ $ 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