------- Comment #10 from jengliang at gmail dot com  2010-03-06 01:37 -------
Hi Manuel,

I think it is a good idea to warn about narrowing both from a type to another
type, and from a type to a bit-field.  For new codes, one should use the
bit-masking technique for bit-field narrowing just as one should use
type-casting for general narrowing.

However, with so many lines of legacy code out there using bit-filed that have
been proven to work, it doesn't make sense to revisit/modify them.  Would it be
possible for gcc to provide a -Wbitfield-conversion flag in new releases and
make 39170 an enhancement (preferably high priority)?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39170

Reply via email to