mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 12:00:03 -05:00
[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
This commit is contained in:
committed by
Nathan Sidwell
parent
e11b709d21
commit
7692e253ee
@@ -674,7 +674,7 @@ struct cpp_dir
|
||||
enum cpp_macro_kind {
|
||||
cmk_macro, /* An ISO macro (token expansion). */
|
||||
cmk_assert, /* An assertion. */
|
||||
cmk_traditional, /* A traditional macro (text expansion). */
|
||||
cmk_traditional /* A traditional macro (text expansion). */
|
||||
};
|
||||
|
||||
/* Each macro definition is recorded in a cpp_macro structure.
|
||||
@@ -972,7 +972,10 @@ inline bool cpp_macro_p (const cpp_hashnode *node)
|
||||
return node->type == NT_MACRO;
|
||||
}
|
||||
/* Returns true if NODE is a function-like user macro. */
|
||||
extern bool cpp_fun_like_macro_p (cpp_hashnode *node);
|
||||
inline bool cpp_fun_like_macro_p (cpp_hashnode *node)
|
||||
{
|
||||
return cpp_user_macro_p (node) && node->value.macro->fun_like;
|
||||
}
|
||||
|
||||
extern const unsigned char *cpp_macro_definition (cpp_reader *,
|
||||
cpp_hashnode *);
|
||||
|
||||
Reference in New Issue
Block a user