gcc
PR preprocessor/22231:
* c-opts.c (sanitize_cpp_opts): Disallow -MG if compilation is
proceeding.
gcc/testsuite
PR preprocessor/22231:
* gcc.dg/pr22231.c: New file.
From-SVN: r135128
+2008-05-09 Tom Tromey <tromey@redhat.com>
+
+ PR preprocessor/22231:
+ * c-opts.c (sanitize_cpp_opts): Disallow -MG if compilation is
+ proceeding.
+
2008-05-09 Uros Bizjak <ubizjak@gmail.com>
PR tree-optimization/36129
flag_dump_includes = 0;
flag_no_line_commands = 1;
}
+ else if (cpp_opts->deps.missing_files)
+ error ("-MG may only be used with -M or -MM");
cpp_opts->unsigned_char = !flag_signed_char;
cpp_opts->stdc_0_in_system_headers = STDC_0_IN_SYSTEM_HEADERS;
+2008-05-09 Tom Tromey <tromey@redhat.com>
+
+ PR preprocessor/22231:
+ * gcc.dg/pr22231.c: New file.
+
2008-05-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36187
--- /dev/null
+/* Test case for PR 22231. -c and -MG are invalid together. */
+
+/* { dg-do compile } */
+/* { dg-options "-MG -MD -c" } */
+/* { dg-error "may only be used with -M" "" 0 */
+
+int anything;