aboutsummaryrefslogtreecommitdiff
path: root/libcpp/macro.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2018-08-20 15:28:15 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2018-08-20 15:28:15 +0000
commit7692e253ee0bdab40fb896991f9208112ebfff61 (patch)
treed7d8e0dbf2fb099ed1f39632f6d6f65ebdbd43c4 /libcpp/macro.c
parente11b709d2107a504c185d75d7e1a2b0b2a2dc6fe (diff)
downloadgcc-7692e253ee0bdab40fb896991f9208112ebfff61.zip
gcc-7692e253ee0bdab40fb896991f9208112ebfff61.tar.gz
gcc-7692e253ee0bdab40fb896991f9208112ebfff61.tar.bz2
[CPP PATCH] Fix warning & other cleanups.
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01162.html * directives.c (do_undef): Use cpp_macro_p & cpp_builtin_macro_p. * include/cpplib.h (enum cpp_macro_kind): Remove trailing comma. (cpp_fun_like_macro_p): Make inline, define. * macro.c (cpp_define_lazily): Use UCHAR_MAX. (cpp_fun_like_macro_p): Delete. From-SVN: r263666
Diffstat (limited to 'libcpp/macro.c')
-rw-r--r--libcpp/macro.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/libcpp/macro.c b/libcpp/macro.c
index 0f9e25d..123f63d 100644
--- a/libcpp/macro.c
+++ b/libcpp/macro.c
@@ -3551,7 +3551,7 @@ cpp_define_lazily (cpp_reader *pfile, cpp_hashnode *node, unsigned num)
{
cpp_macro *macro = node->value.macro;
- gcc_checking_assert (pfile->cb.user_lazy_macro && macro && num < 255);
+ gcc_checking_assert (pfile->cb.user_lazy_macro && macro && num < UCHAR_MAX);
macro->lazy = num + 1;
}
@@ -3632,15 +3632,6 @@ check_trad_stringification (cpp_reader *pfile, const cpp_macro *macro,
}
}
-/* Returns true of NODE is a function-like macro. */
-bool
-cpp_fun_like_macro_p (cpp_hashnode *node)
-{
- return (node->type == NT_MACRO
- && (node->flags & (NODE_BUILTIN | NODE_MACRO_ARG)) == 0
- && node->value.macro->fun_like);
-}
-
/* Returns the name, arguments and expansion of a macro, in a format
suitable to be read back in again, and therefore also for DWARF 2
debugging info. e.g. "PASTE(X, Y) X ## Y", or "MACNAME EXPANSION".