|
[DPRG] I didn't want this to work: C structure confusion
Subject: [DPRG] I didn't want this to work: C structure confusion
From: Dale Wheat
dale at dalewheat.com
Date: Fri Sep 8 17:33:36 CDT 2006
Ed,
> The allowed types for bitfields in a struct or union in C are only int,
> signed int or unsigned int. What is happening here is the compiler
> preprocessor is using the default promotion of your defined types to int,
> after that assignment from any other type with the same default promotion
> will work without generating any warnings or errors.
Well, fiddlesticks. Any way to do what I'm trying to do?
Thanks,
Dale
More information about the DPRG mailing list
|