This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch - gcc-4.0 not c99 conforming when assigning scalar values to boolean bitfields



On Mar 31, 2005, at 2:45 PM, Geoffrey Keating wrote:



I don't think this change is completely right. What happens if 'f2' has size 200? I think your change would see that 32 < 200 and will have no effect.

This situation is caught as error before my code is reached. It happens in
routine check_bitfield_type_and_width. In fact, any value bigger than
CHAR_TYPE_SIZE is flagged as error.


- fariborz



So, I think you should delete the '< width' condition, and add an extra testcase for a very large '_Bool' field; if that works, then the patch is OK.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]