aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 6f2a997..9b2ecca 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -1094,6 +1094,25 @@ cpp_finish (pfile)
}
}
}
+
+ if (opts->dump_macros == dump_only)
+ {
+ int i;
+ HASHNODE *h;
+ MACRODEF m;
+ for (i = HASHSIZE; --i >= 0;)
+ {
+ for (h = pfile->hashtab[i]; h; h = h->next)
+ if (h->type == T_MACRO)
+ {
+ m.defn = h->value.defn;
+ m.symnam = h->name;
+ m.symlen = h->length;
+ dump_definition (pfile, m);
+ CPP_PUTC (pfile, '\n');
+ }
+ }
+ }
}
/* Handle one command-line option in (argc, argv).