aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2014-07-24 09:00:13 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2014-07-24 09:00:13 +0000
commitcdc94aca13aa1bf9531ed11d798e346c99a6c83f (patch)
tree80f4055f85aa23d29694b53c72ed56d1d18bf7c2 /gcc/c-family
parent34f2124e5f92ba0f2d48a86a77ea4b6347ccf027 (diff)
downloadgcc-cdc94aca13aa1bf9531ed11d798e346c99a6c83f.zip
gcc-cdc94aca13aa1bf9531ed11d798e346c99a6c83f.tar.gz
gcc-cdc94aca13aa1bf9531ed11d798e346c99a6c83f.tar.bz2
re PR c/57653 (filename information discarded when using -imacros)
PR c/57653 * c-opts.c (c_finish_options): If -imacros is in effect, return. * c-c++-common/pr57653.c: New test. * c-c++-common/pr57653.h: New file. * c-c++-common/pr57653-2.c: New test. * c-c++-common/pr57653-2.h: New file. From-SVN: r212972
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c-opts.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 186c041..81ec256 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-24 Marek Polacek <polacek@redhat.com>
+
+ PR c/57653
+ * c-opts.c (c_finish_options): If -imacros is in effect, return.
+
2014-07-16 Dodji Seketeli <dodji@redhat.com>
PR preprocessor/60723 - missing system-ness marks for macro tokens
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;