avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [bug #13106] wrong handle of union definitions in bitfiel


From: Markus Königshaus
Subject: [avr-libc-dev] [bug #13106] wrong handle of union definitions in bitfields
Date: Tue, 17 May 2005 08:03:23 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)

URL:
  <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=13106>

                 Summary: wrong handle of union definitions in bitfields
                 Project: AVR C Runtime Library
            Submitted by: makoe
            Submitted on: Die 17.05.2005 um 08:03
                Category: Library
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
        Originator Email: address@hidden
             Open/Closed: Open

    _______________________________________________________

Details:

used definition (example):

typedef struct
{
  uint8_t b_bit0 : 1;
  uint8_t b_bit1 : 1;
  uint8_t b_bit2 : 1;
  union
   { 
    uint8_t b_union0 : 1;
    uint8_t b_union1 : 1;
   };
  uint8_t reserve : 4;
} _T_bitfield;

_T_bitfield bitfield;
bitfield.b_union1 = 1; // does not work! Bit number 4 will not be set to 1.
The asm - code initialise the worng Byteadress.



    _______________________________________________________

Carbon-Copy List:

CC Address                          | Comment
------------------------------------+-----------------------------
makoe                               | BUG in der union-Behandlung abgesendet.




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=13106>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]