[Bug c++/17651] New: Erroneous preprocessor output with -g when generating dependencies

simon dot marshall at misys dot com gcc-bugzilla@gcc.gnu.org
Fri Sep 24 09:26:00 GMT 2004


When using -MM/-MT/-MF to generate dependencies, then a preprocessor line of 
the form '# 1 "<cwd>/"' is erroneously output to stdout if -g is also used.  
However, the generated dependency file itself is ok.  This is a regression from 
3.3.4.

[marshals@itanic itanic]$ ~/slash342/usr/local/bin/g++ -v
Reading specs from /home/marshals/slash342/usr/local/lib/gcc/ia64-redhat-
linux/3.4.2/specs
Configured with: ../configure --prefix=/home/marshals/slash342/usr/local --
enable-languages=c,c++ --enable-shared --enable-threads=posix --disable-
checking --with-system-zlib --enable-__cxa_atexit --host=ia64-redhat-linux
Thread model: posix
gcc version 3.4.2
[marshals@itanic itanic]$ ~/slash342/usr/local/bin/g++ -MM -MT "./bug2.o 
bug2.d" -MF bug2.d -c bug2.cpp
[marshals@itanic itanic]$ ~/slash342/usr/local/bin/g++ -g -MM -MT "./bug2.o 
bug2.d" -MF bug2-g.d -c bug2.cpp
# 1 "/rvcarma/marshals/carma/itanic//"
[marshals@itanic itanic]$ diff bug2.d bug2-g.d 
[marshals@itanic itanic]$ cat bug2.cpp
#include <stdio.h>
int main () {
        return 0;
}
[marshals@itanic itanic]$

-- 
           Summary: Erroneous preprocessor output with -g when generating
                    dependencies
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: simon dot marshall at misys dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: ia64-redhat-linux


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



More information about the Gcc-bugs mailing list