aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r--gcc/cppexp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index c6f1f1d..5603f5b 100644
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -1347,7 +1347,8 @@ num_binary_op (cpp_reader *pfile, cpp_num lhs, cpp_num rhs, enum cpp_ttype op)
/* Comma. */
default: /* case CPP_COMMA: */
- if (CPP_PEDANTIC (pfile) && !pfile->state.skip_eval)
+ if (CPP_PEDANTIC (pfile) && (!CPP_OPTION (pfile, c99)
+ || !pfile->state.skip_eval))
cpp_error (pfile, CPP_DL_PEDWARN,
"comma operator in operand of #if");
lhs = rhs;