[Bug driver/57951] -MG doesn't work with -MD

2015-07-05 Thread f.heckenb...@fh-soft.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57951

--- Comment #2 from Frank Heckenbach f.heckenb...@fh-soft.de ---
Another bug that may be related to this one (and certainly depends
on it), originally reported as Debian bug #613551:

Tested with gcc-4.1 (apparently the last version that did allow -MD -MG):

When using -MG, gcc doesn't give an error message, neither exits
with nonzero status when included files don't exist, even if not
only preprocessing (-M), but also when actually compiling (-MD).

This can, in extreme cases, lead to miscompilation (if the included
file e.g. redefines existing macros), usually only to surprising
errors (the results of missing declarations from the include file,
without a leading hint to its absence).

% cat foo.c
#include non-existing-file
% gcc -MD -MG -c foo.c
% echo $?
0


[Bug driver/57951] -MG doesn't work with -MD

2014-02-06 Thread douglas at halo dot gen.nz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57951

Douglas Bagnall douglas at halo dot gen.nz changed:

   What|Removed |Added

 CC||douglas at halo dot gen.nz

--- Comment #1 from Douglas Bagnall douglas at halo dot gen.nz ---
Also present in 4.8.1, and it also affects -MMD as you might expect.