http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51994
--- Comment #20 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-01-26 11:00:33 UTC --- > Eric, you should know this area the best - what do you recommend here? > [we could assert in the unsigned bitpos taking functions that the MSB > is not set on bitpos] I agree that making get_inner_reference artificially return a non-zero poffset would most certainly be problematic as this would change the semantics. But it's also clear that the lower level bit-field manipulation routines aren't really prepared to deal with negative stuff. So I think that we shouldn't change the prototypes of these routines, but instead patch up callers that forward the values returned by get_inner_reference to these routines. Adding assertions in these routines could indeed help.