[Bug preprocessor/69126] [6 regression] _Pragma does not apply if part of a macro

dmalcolm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 27 18:58:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69126

--- Comment #16 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Wed Jan 27 18:57:51 2016
New Revision: 232893

URL: https://gcc.gnu.org/viewcvs?rev=232893&root=gcc&view=rev
Log:
libcpp: use better locations for _Pragma tokens (preprocessor/69126)

gcc/testsuite/ChangeLog:
        PR preprocessor/69126
        * c-c++-common/pr69126.c: New test case.

libcpp/ChangeLog:
        PR preprocessor/69126
        * directives.c (destringize_and_run): Add expansion_loc param; use
        it when handling unexpanded pragmas to fixup the locations of the
        synthesized tokens.
        (_cpp_do__Pragma): Add expansion_loc param and use it when calling
        destringize_and_run.
        * internal.h (_cpp_do__Pragma): Add expansion_loc param.
        * macro.c (builtin_macro): Pass expansion location of _Pragma to
        _cpp_do__Pragma.


Added:
    trunk/gcc/testsuite/c-c++-common/pr69126.c
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/libcpp/ChangeLog
    trunk/libcpp/directives.c
    trunk/libcpp/internal.h
    trunk/libcpp/macro.c


More information about the Gcc-bugs mailing list