http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57951
Bug ID: 57951 Summary: -MG doesn't work with -MD Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de This was reported as Debian bug #593086 several years ago ... % gcc -MD -MG foo.c cc1: error: -MG may only be used with -M or -MM (Contents of source file don't matter.) According to the manual `-MD' is equivalent to `-M -MF FILE', except that `-E' is not implied. so I figure it should work. (It did in previous versions, e.g. 4.1.2) There seems to be no work-around since "-M" implies "-E". I guess the driver only needs to be told that "-MD" is also OK for "-MG" to work since it implies "-M".