[Bug preprocessor/41329] New: -M does not properly escape special characters.

akim dot demaille at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Sep 10 11:26:00 GMT 2009


Colon (:) is definitely a special character for Make.  GCC seems not to be
willing to protect it though.  Even if I use -MQ for the target name.

$ echo "int i; " > c:c.c
$ gcc -c -M c:c.c
c:c.o: c:c.c
$ gcc -c -M c:c.c -MQ :
:: c:c.c

(it does not seem to be working for '*' either, nor '%').


-- 
           Summary: -M does not properly escape special characters.
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: akim dot demaille at gmail dot com


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



More information about the Gcc-bugs mailing list