diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-31 22:47:25 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-31 22:47:25 +0000 |
commit | df863d33ab916c6d45697eb5fc5c1d5682a8e107 (patch) | |
tree | f637ade47d19715a8cf418b551c01d28ece8d143 /libcpp/expr.c | |
parent | fee106ed89c52617e2135074886d79ba5dca89ea (diff) | |
download | gcc-df863d33ab916c6d45697eb5fc5c1d5682a8e107.tar.gz |
PR preprocessor/45457
* expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
needed.
* directives.c (do_ifdef, do_ifndef): Likewise.
* c-c++-common/cpp/pr45457.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163705 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/expr.c')
-rw-r--r-- | libcpp/expr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libcpp/expr.c b/libcpp/expr.c index 4dbc98974af..d2f6c3cf0ac 100644 --- a/libcpp/expr.c +++ b/libcpp/expr.c @@ -700,6 +700,9 @@ parse_defined (cpp_reader *pfile) node->flags |= NODE_USED; if (node->type == NT_MACRO) { + if ((node->flags & NODE_BUILTIN) + && pfile->cb.user_builtin_macro) + pfile->cb.user_builtin_macro (pfile, node); if (pfile->cb.used_define) pfile->cb.used_define (pfile, pfile->directive_line, node); } |