aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppmain.c
diff options
context:
space:
mode:
authorNeil Booth <neil@cat.daikokuya.demon.co.uk>2001-06-23 11:34:41 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-06-23 11:34:41 +0000
commit7096171b54c3c65346c5f1a3e8caa81994a9af4c (patch)
tree75b264967bade84449656edb690611175b697fb9 /gcc/cppmain.c
parentbc04d12c309d59314c19ecb7e103fc50852c793c (diff)
downloadgcc-7096171b54c3c65346c5f1a3e8caa81994a9af4c.zip
gcc-7096171b54c3c65346c5f1a3e8caa81994a9af4c.tar.gz
gcc-7096171b54c3c65346c5f1a3e8caa81994a9af4c.tar.bz2
cppmacro.c (make_string_token): Avoid warning.
* cppmacro.c (make_string_token): Avoid warning. (cpp_macro_definition): Prepend the macro name. Update comments. * cppmain.c (cb_define, dump_macro): Update for changes to cpp_macro_definition. From-SVN: r43528
Diffstat (limited to 'gcc/cppmain.c')
-rw-r--r--gcc/cppmain.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cppmain.c b/gcc/cppmain.c
index 0c5dc3d..b946a8e 100644
--- a/gcc/cppmain.c
+++ b/gcc/cppmain.c
@@ -364,11 +364,13 @@ cb_define (pfile, node)
cpp_hashnode *node;
{
maybe_print_line (cpp_get_line (pfile)->output_line);
- fprintf (print.outf, "#define %s", NODE_NAME (node));
+ fputs ("#define ", print.outf);
/* -dD command line option. */
if (options->dump_macros == dump_definitions)
fputs ((const char *) cpp_macro_definition (pfile, node), print.outf);
+ else
+ fputs ((const char *) NODE_NAME (node), print.outf);
putc ('\n', print.outf);
print.lineno++;
@@ -446,7 +448,7 @@ dump_macro (pfile, node, v)
{
if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN))
{
- fprintf (print.outf, "#define %s", NODE_NAME (node));
+ fputs ("#define ", print.outf);
fputs ((const char *) cpp_macro_definition (pfile, node), print.outf);
putc ('\n', print.outf);
print.lineno++;