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
This commit is contained in:
parent
4927b3d487
commit
807625cf45
|
@ -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.
|
||||
|
|
|
@ -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}.
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue