aboutsummaryrefslogtreecommitdiff
path: root/libcpp/macro.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2016-01-27 18:57:51 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2016-01-27 18:57:51 +0000
commit0afff540e652c77b409ce094f64cc2b033495785 (patch)
treef6cecd18c9211abd83605d0385a9448c4f50e786 /libcpp/macro.c
parentb45285fc2ee430b675f57e8c92310aaf77ba031e (diff)
downloadgcc-0afff540e652c77b409ce094f64cc2b033495785.zip
gcc-0afff540e652c77b409ce094f64cc2b033495785.tar.gz
gcc-0afff540e652c77b409ce094f64cc2b033495785.tar.bz2
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. From-SVN: r232893
Diffstat (limited to 'libcpp/macro.c')
-rw-r--r--libcpp/macro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcpp/macro.c b/libcpp/macro.c
index ca1d1d6..cfb09ce 100644
--- a/libcpp/macro.c
+++ b/libcpp/macro.c
@@ -430,7 +430,7 @@ builtin_macro (cpp_reader *pfile, cpp_hashnode *node, source_location loc)
if (pfile->state.in_directive)
return 0;
- return _cpp_do__Pragma (pfile);
+ return _cpp_do__Pragma (pfile, loc);
}
buf = _cpp_builtin_macro_text (pfile, node);