summarylogtreecommitdiffstats
path: root/gcc-4.8-filename-output.patch
blob: 7c2ee0aa5a58686610cb94d073ff8d65fb048c0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 968b703..3f8e6e6 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -1438,6 +1438,12 @@ c_finish_options (void)
 static void
 push_command_line_include (void)
 {
+  /* This can happen if disabled by -imacros for example.
+     Punt so that we don't set "<command-line>" as the filename for
+     the header.  */
+  if (include_cursor > deferred_count)
+    return;
+
   if (!done_preinclude)
     {
       done_preinclude = true;