summaryrefslogtreecommitdiff
path: root/gcc/cppmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cppmain.c')
-rw-r--r--gcc/cppmain.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/cppmain.c b/gcc/cppmain.c
index 0af5442f3f8..6fc7c33639e 100644
--- a/gcc/cppmain.c
+++ b/gcc/cppmain.c
@@ -145,11 +145,14 @@ cb_define (pfile, hash)
cpp_reader *pfile;
cpp_hashnode *hash;
{
- cpp_printf (pfile, &parse_out, "#define %s", hash->name);
- if (CPP_OPTION (pfile, debug_output)
- || CPP_OPTION (pfile, dump_macros) == dump_definitions)
- cpp_dump_definition (pfile, parse_out.outf, hash);
- putc ('\n', parse_out.outf);
+ if (pfile->done_initializing)
+ {
+ cpp_printf (pfile, &parse_out, "#define %s", hash->name);
+ if (CPP_OPTION (pfile, debug_output)
+ || CPP_OPTION (pfile, dump_macros) == dump_definitions)
+ cpp_dump_definition (pfile, parse_out.outf, hash);
+ putc ('\n', parse_out.outf);
+ }
}
static void
@@ -157,7 +160,8 @@ cb_undef (pfile, hash)
cpp_reader *pfile;
cpp_hashnode *hash;
{
- cpp_printf (pfile, &parse_out, "#undef %s\n", hash->name);
+ if (pfile->done_initializing)
+ cpp_printf (pfile, &parse_out, "#undef %s\n", hash->name);
}
static void