diff options
author | Mark Mitchell <mark@codesourcery.com> | 1999-10-03 16:04:30 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-10-03 16:04:30 +0000 |
commit | 807625cf45d49ff58c333a0ad826f267d1f45a04 (patch) | |
tree | 9d910bc8a4f5ce49f10a39c743561b2ad5f278db /gcc | |
parent | 4927b3d4878be4c5171154b32a5d58be9ffccba0 (diff) | |
download | gcc-807625cf45d49ff58c333a0ad826f267d1f45a04.zip gcc-807625cf45d49ff58c333a0ad826f267d1f45a04.tar.gz gcc-807625cf45d49ff58c333a0ad826f267d1f45a04.tar.bz2 |
tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for bitfields, rather than DECL_BIT_FIELD.
* tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
bitfields, rather than DECL_BIT_FIELD.
* ir.texi: Document how to tell whether or not a field is a
bitfield.
* lex.c (make_lang_type): Fix typo in comment.
From-SVN: r29781
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cp/ir.texi | 2 | ||||
-rw-r--r-- | gcc/cp/lex.c | 2 | ||||
-rw-r--r-- | gcc/cp/tree.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/bitfld4.C | 25 |
5 files changed, 37 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 814e211..ffe4cd2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +1999-10-03 Mark Mitchell <mark@codesourcery.com> + + * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for + bitfields, rather than DECL_BIT_FIELD. + * ir.texi: Document how to tell whether or not a field is a + bitfield. + + * lex.c (make_lang_type): Fix typo in comment. + 1999-10-01 Jason Merrill <jason@yorick.cygnus.com> * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues. diff --git a/gcc/cp/ir.texi b/gcc/cp/ir.texi index 2831e3b..6e1623e 100644 --- a/gcc/cp/ir.texi +++ b/gcc/cp/ir.texi @@ -842,7 +842,7 @@ These nodes represent non-static data members. The @code{DECL_SIZE} and @code{INTEGER_CST}. These values are indexed from zero, where zero indicates the first bit in the object. -FIXME: Talk about bitfields. +If @code{DECL_C_BIT_FIELD} holds, this field is a bitfield. @item NAMESPACE_DECL @xref{Namespaces}. diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index acc99c7..5d87eea 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -4830,7 +4830,7 @@ make_lang_type (code) clear it here. */ TYPE_ALIAS_SET (t) = 0; - /* We need to allocate a TYPE_BINFO even for TEMPALTE_TYPE_PARMs + /* We need to allocate a TYPE_BINFO even for TEMPLATE_TYPE_PARMs since they can be virtual base types, and we then need a canonical binfo for them. Ideally, this would be done lazily for all types. */ diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 8e4f2da..96a1549 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -86,7 +86,7 @@ lvalue_p_1 (ref, treat_class_rvalues_as_lvalues) /* The "field" can be a FUNCTION_DECL or an OVERLOAD in some situations. */ && TREE_CODE (TREE_OPERAND (ref, 1)) == FIELD_DECL - && DECL_BIT_FIELD (TREE_OPERAND (ref, 1))) + && DECL_C_BIT_FIELD (TREE_OPERAND (ref, 1))) { /* Clear the ordinary bit. If this object was a class rvalue we want to preserve that information. */ diff --git a/gcc/testsuite/g++.old-deja/g++.other/bitfld4.C b/gcc/testsuite/g++.old-deja/g++.other/bitfld4.C new file mode 100644 index 0000000..ac0a378 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/bitfld4.C @@ -0,0 +1,25 @@ +// Build don't link: +// Origin: "Chen, Wen-Ke" <chwk@cs.arizona.edu> + +template <class T> +bool operator!=(const T&, const T&); + +enum MsgType { + MSG_DATA +}; + +class C { +public: + MsgType mType : 8; +}; + +int main(void) +{ + extern C& c; + + c.mType = MSG_DATA; + if (c.mType != MSG_DATA) + return -1; + + return 0; +} |