bugAVR C Runtime Library - Bugs: bug #13106, wrong handle of union definitions...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #13106: wrong handle of union definitions in bitfields

Submitter:  Markus Königshaus <makoe>
Submitted:  Tue 17 May 2005 08:03:21 AM UTC
   
 
Category:  Library Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid Assigned to:  None
Percent Complete:  0% Open/Closed:  Closed
Release:  None Fixed Release:  None

Wed 18 May 2005 08:50:33 PM UTC, comment #1: 

See email to the avr-libc-dev list.

This is a C compiler issue, and even one far out in
"implementation-defined" land so there's not much chance
to really complain about it.

Joerg Wunsch <joerg_wunsch>
Group administrator
Tue 17 May 2005 08:03:21 AM UTC, original submission:  

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.

Markus Königshaus <makoe>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-05-19 joerg_wunsch Open/ClosedOpen Closed
2005-05-18 joerg_wunsch StatusNone Invalid
2005-05-17 makoe Carbon-Copy- Added makoe

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code