Message ID | m38vi38wmm.fsf@redhat.com |
---|---|
State | New |
Headers | show |
On 04/10/2012 10:55 AM, Dodji Seketeli wrote:
> + if (CPP_OPTION (pfile, track_macro_expansion))
I think this should check context->tokens_kind rather than the compiler
flag.
Jason
diff --git a/libcpp/macro.c b/libcpp/macro.c index 54de3e3..58a722c 100644 --- a/libcpp/macro.c +++ b/libcpp/macro.c @@ -2436,7 +2436,15 @@ cpp_get_token_with_location (cpp_reader *pfile, source_location *loc) int cpp_sys_macro_p (cpp_reader *pfile) { - cpp_hashnode *node = pfile->context->c.macro; + cpp_hashnode *node = NULL; + + if (CPP_OPTION (pfile, track_macro_expansion)) + { + if (pfile->context->c.mc) + node = pfile->context->c.mc->macro_node; + } + else + node = pfile->context->c.macro; return node && node->value.macro && node->value.macro->syshdr; }