[Bug c/107448] New: GCC no longer diagnoses missing input file with -MG
boris at kolpackov dot net
gcc-bugzilla@gcc.gnu.org
Fri Oct 28 06:31:14 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107448
Bug ID: 107448
Summary: GCC no longer diagnoses missing input file with -MG
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: boris at kolpackov dot net
Target Milestone: ---
With GCC 10 when trying to extract dependency information with -MG we get
diagnostics if the input file does not exist:
$ g++-10 -M -MG /tmp/no-such-file.cxx
g++-10: error: /tmp/no-such-file.cxx: No such file or directory
g++-10: fatal error: no input files
compilation terminated.
$ echo $?
1
In GCC 11 and 12 this diagnostics is gone:
$ g++-11 -M -MG /tmp/no-such-file.cxx
$ echo $?
1
$ g++-12 -M -MG /tmp/no-such-file.cxx
$ echo $?
1
More information about the Gcc-bugs
mailing list