aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/libcpp/macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/libcpp/macro.c')
-rw-r--r--gcc-4.8/libcpp/macro.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc-4.8/libcpp/macro.c b/gcc-4.8/libcpp/macro.c
index 6d46027e4..77e8acc70 100644
--- a/gcc-4.8/libcpp/macro.c
+++ b/gcc-4.8/libcpp/macro.c
@@ -1108,21 +1108,22 @@ enter_macro_context (cpp_reader *pfile, cpp_hashnode *node,
if (macro->paramc == 0)
{
+ unsigned tokens_count = macro_real_token_count (macro);
if (CPP_OPTION (pfile, track_macro_expansion))
{
- unsigned int i, count = macro->count;
+ unsigned int i;
const cpp_token *src = macro->exp.tokens;
const struct line_map *map;
source_location *virt_locs = NULL;
- _cpp_buff *macro_tokens =
- tokens_buff_new (pfile, count, &virt_locs);
+ _cpp_buff *macro_tokens
+ = tokens_buff_new (pfile, tokens_count, &virt_locs);
/* Create a macro map to record the locations of the
tokens that are involved in the expansion. LOCATION
is the location of the macro expansion point. */
map = linemap_enter_macro (pfile->line_table,
- node, location, count);
- for (i = 0; i < count; ++i)
+ node, location, tokens_count);
+ for (i = 0; i < tokens_count; ++i)
{
tokens_buff_add_token (macro_tokens, virt_locs,
src, src->src_loc,
@@ -1134,17 +1135,13 @@ enter_macro_context (cpp_reader *pfile, cpp_hashnode *node,
virt_locs,
(const cpp_token **)
macro_tokens->base,
- count);
- num_macro_tokens_counter += count;
+ tokens_count);
}
else
- {
- unsigned tokens_count = macro_real_token_count (macro);
_cpp_push_token_context (pfile, node, macro->exp.tokens,
tokens_count);
num_macro_tokens_counter += tokens_count;
}
- }
if (pragma_buff)
{