summaryrefslogtreecommitdiff
path: root/gnu/egcs/gcc/cccp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/egcs/gcc/cccp.c')
-rw-r--r--gnu/egcs/gcc/cccp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu/egcs/gcc/cccp.c b/gnu/egcs/gcc/cccp.c
index 65070224f45..dfb2157e65c 100644
--- a/gnu/egcs/gcc/cccp.c
+++ b/gnu/egcs/gcc/cccp.c
@@ -141,6 +141,10 @@ static int for_lint = 0;
static int put_out_comments = 0;
+/* Nonzero means pass comments inside macros */
+
+static int pass_through_comments = 0;
+
/* Nonzero means don't process the ANSI trigraph sequences. */
static int no_trigraphs = 0;
@@ -1677,6 +1681,8 @@ main (argc, argv)
case 'C':
put_out_comments = 1;
+ if (argv[i][2] == 'C')
+ pass_through_comments = 1;
break;
case 'E': /* -E comes from cc -E; ignore it. */
@@ -3777,7 +3783,8 @@ handle_directive (ip, op)
limit = ip->buf + ip->length;
unterminated = 0;
already_output = 0;
- keep_comments = traditional && kt->type == T_DEFINE;
+ keep_comments = (traditional || pass_through_comments)
+ && kt->type == T_DEFINE;
/* #import is defined only in Objective C, or when on the NeXT. */
if (kt->type == T_IMPORT
&& !(objc || lookup ((U_CHAR *) "__NeXT__", -1, -1)))