Commit cdc94aca by Marek Polacek Committed by Marek Polacek

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
parent 34f2124e
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> 2014-07-16 Dodji Seketeli <dodji@redhat.com>
PR preprocessor/60723 - missing system-ness marks for macro tokens PR preprocessor/60723 - missing system-ness marks for macro tokens
......
...@@ -1438,6 +1438,12 @@ c_finish_options (void) ...@@ -1438,6 +1438,12 @@ c_finish_options (void)
static void static void
push_command_line_include (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) if (!done_preinclude)
{ {
done_preinclude = true; done_preinclude = true;
......
2014-07-24 Marek Polacek <polacek@redhat.com>
PR c/57653
* 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.
2014-07-23 Jiong Wang <jiong.wang@arm.com> 2014-07-23 Jiong Wang <jiong.wang@arm.com>
* gcc.target/aarch64/test_frame_common.h: New file. * gcc.target/aarch64/test_frame_common.h: New file.
......
/* { dg-do preprocess } */
/* { dg-options "-imacros ${srcdir}/c-c++-common/pr57653-2.h" } */
/* Empty. */
/* { dg-do compile } */
/* { dg-options "-imacros ${srcdir}/c-c++-common/pr57653.h" } */
__attribute__((used)) static const char s[] = F;
/* { dg-final { scan-assembler-not "command-line" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment