X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fcppmacro.c;h=eba8c0032a3ada313adcea21d81deb989f1b2ec5;hb=7de4f5f229944e622115372dedac95f86ab3ef2f;hp=b0b10ae92d755f3e4d624a742b6c444016ab2bde;hpb=4970d4c276556431657c6c1bb020b0ca892535b0;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index b0b10ae92d7..eba8c0032a3 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -1275,10 +1275,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 (¯o1->exp.tokens[i], ¯o2->exp.tokens[i])) - return true; + if (macro1->count != macro2->count) + return true; + + for (i = 0; i < macro1->count; i++) + if (!_cpp_equiv_tokens (¯o1->exp.tokens[i], ¯o2->exp.tokens[i])) + return true; return false; } @@ -1715,7 +1717,7 @@ cpp_macro_definition (pfile, node) if (token->type == CPP_MACRO_ARG) len += NODE_LEN (macro->params[token->val.arg_no - 1]); else - len += cpp_token_len (token); /* Includes room for ' '. */ + len += cpp_token_len (token) + 1; /* Includes room for ' '. */ if (token->flags & STRINGIFY_ARG) len++; /* "#" */ if (token->flags & PASTE_LEFT)