diff options
author | Nathan Sidwell <nathan@acm.org> | 2018-10-31 14:51:54 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2018-10-31 14:51:54 +0000 |
commit | c9fb347ea14cd8f519a71374c97547044413a71f (patch) | |
tree | a075488d4fef537b97d9429136a5011de627d980 /libcpp/include/cpplib.h | |
parent | 43af5ef1cefc671f7baf3d0e33d46ab7f9a7d8b1 (diff) | |
download | gcc-c9fb347ea14cd8f519a71374c97547044413a71f.zip gcc-c9fb347ea14cd8f519a71374c97547044413a71f.tar.gz gcc-c9fb347ea14cd8f519a71374c97547044413a71f.tar.bz2 |
[3/7] Preprocessor macro loc
https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02039.html
* include/cpplib.h (cpp_macro_definition_location): Make inline.
* macro.c (warn_of_redefinition): Fix comments, examine macro
type, use C++ for.
(cpp_macro_definition_location): Don't define here.
From-SVN: r265688
Diffstat (limited to 'libcpp/include/cpplib.h')
-rw-r--r-- | libcpp/include/cpplib.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index 345155b..a2dab52 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -1017,7 +1017,10 @@ inline bool cpp_fun_like_macro_p (cpp_hashnode *node) extern const unsigned char *cpp_macro_definition (cpp_reader *, cpp_hashnode *); -extern source_location cpp_macro_definition_location (cpp_hashnode *); +inline source_location cpp_macro_definition_location (cpp_hashnode *node) +{ + return node->value.macro->line; +} extern void _cpp_backup_tokens (cpp_reader *, unsigned int); extern const cpp_token *cpp_peek_token (cpp_reader *, int); |