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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29781
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
@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}.
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. */
/* 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. */
--- /dev/null
+// 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;
+}