aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-09-23 08:13:25 -0700
committerNathan Sidwell <nathan@acm.org>2020-09-23 08:15:40 -0700
commitc80ee302a8cfff18c5a14f5ca21b9ae35c4cab2e (patch)
tree93a355773e84616eddfaf61050278f9ae50a7e5a /gcc
parentda13b7737662da11f8fefb28eaf4ed7c50c51767 (diff)
downloadgcc-c80ee302a8cfff18c5a14f5ca21b9ae35c4cab2e.zip
gcc-c80ee302a8cfff18c5a14f5ca21b9ae35c4cab2e.tar.gz
gcc-c80ee302a8cfff18c5a14f5ca21b9ae35c4cab2e.tar.bz2
c++: Remove some gratuitous typedefing
This is C++, we don't need 'typedef struct foo foo;'. Oh, and bool bitfields are a thing. gcc/cp/ * name-lookup.h (typedef cxx_binding): Delete tdef. (typedef cp_binding_level): Likewise. (struct cxx_binding): Flags are bools.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/name-lookup.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h
index a0815e1..5d2d364f 100644
--- a/gcc/cp/name-lookup.h
+++ b/gcc/cp/name-lookup.h
@@ -47,12 +47,8 @@ struct GTY(()) binding_entry_s {
extern void binding_table_foreach (binding_table, bt_foreach_proc, void *);
extern binding_entry binding_table_find (binding_table, tree);
-/* Datatype that represents binding established by a declaration between
- a name and a C++ entity. */
-typedef struct cxx_binding cxx_binding;
-
/* The datatype used to implement C++ scope. */
-typedef struct cp_binding_level cp_binding_level;
+struct cp_binding_level;
/* Nonzero if this binding is for a local scope, as opposed to a class
or namespace scope. */
@@ -62,6 +58,8 @@ typedef struct cp_binding_level cp_binding_level;
currently being defined. */
#define INHERITED_VALUE_BINDING_P(NODE) ((NODE)->value_is_inherited)
+/* Datatype that represents binding established by a declaration between
+ a name and a C++ entity. */
struct GTY(()) cxx_binding {
/* Link to chain together various bindings for this name. */
cxx_binding *previous;
@@ -71,8 +69,9 @@ struct GTY(()) cxx_binding {
tree type;
/* The scope at which this binding was made. */
cp_binding_level *scope;
- unsigned value_is_inherited : 1;
- unsigned is_local : 1;
+
+ bool value_is_inherited : 1;
+ bool is_local : 1;
};
/* Datatype used to temporarily save C++ bindings (for implicit