diff options
Diffstat (limited to 'libcpp/directives.c')
-rw-r--r-- | libcpp/directives.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/libcpp/directives.c b/libcpp/directives.c index e46280e46b0..66fa66daa64 100644 --- a/libcpp/directives.c +++ b/libcpp/directives.c @@ -1362,35 +1362,7 @@ do_pragma (cpp_reader *pfile) { bool allow_name_expansion = p->allow_expansion; if (allow_name_expansion) - { - pfile->state.prevent_expansion--; - /* - Kludge ahead. - - Consider this code snippet: - - #define P parallel - #pragma omp P for - ... a for loop ... - - Once we parsed the 'omp' namespace of the #pragma - directive, we then parse the 'P' token that represents the - pragma name. P being a macro, it is expanded into the - resulting 'parallel' token. - - At this point the 'p' variable contains the 'parallel' - pragma name. And pfile->context->macro is non-null - because we are still right at the end of the macro - context of 'P'. The problem is, if we are being - (indirectly) called by cpp_get_token_with_location, - that function might test pfile->context->macro to see - if we are in the context of a macro expansion, (and we - are) and then use pfile->invocation_location as the - location of the macro invocation. So we must instruct - cpp_get_token below to set - pfile->invocation_location. */ - pfile->set_invocation_location = true; - } + pfile->state.prevent_expansion--; token = cpp_get_token (pfile); if (token->type == CPP_NAME) |