aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppmacro.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r--gcc/cppmacro.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index fe78993bc4d..b97fe811c71 100644
--- a/gcc/cppmacro.c
+++ b/gcc/cppmacro.c
@@ -897,7 +897,7 @@ replace_args (pfile, node, macro, args)
count = arg->expanded_count, from = arg->expanded;
/* Padding on the left of an argument (unless RHS of ##). */
- if (!pfile->state.in_directive
+ if ((!pfile->state.in_directive || pfile->state.directive_wants_padding)
&& src != macro->exp.tokens && !(src[-1].flags & PASTE_LEFT))
*dest++ = padding_token (pfile, src);
@@ -1279,10 +1279,12 @@ warn_of_redefinition (pfile, node, macro2)
if (CPP_OPTION (pfile, traditional))
return _cpp_expansions_different_trad (macro1, macro2);
- if (macro1->count == macro2->count)
- for (i = 0; i < macro1->count; i++)
- if (!_cpp_equiv_tokens (&macro1->exp.tokens[i], &macro2->exp.tokens[i]))
- return true;
+ if (macro1->count != macro2->count)
+ return true;
+
+ for (i = 0; i < macro1->count; i++)
+ if (!_cpp_equiv_tokens (&macro1->exp.tokens[i], &macro2->exp.tokens[i]))
+ return true;
return false;
}