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

 
 

bug #13106: wrong handle of union definitions in bitfields

Submitted by:  Markus Königshaus <makoe>
Submitted on:  Tue 17 May 2005 08:03:21 AM UTC  
 
Category: LibrarySeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: InvalidPercent Complete: 0%
Assigned to: NoneOpen/Closed: Closed
Release: NoneFixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 19 May 2005 04:53:25 AM UTCjoerg_wunschOpen/ClosedOpen=>Closed
Wed 18 May 2005 08:50:33 PM UTCjoerg_wunschStatusNone=>Invalid
Tue 17 May 2005 08:03:21 AM UTCmakoeCarbon-Copy-=>Added makoe

Back to the top


Powered by Savane 3.1-cleanup1