This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/4] bitpos expansion summary reloaded
On Tue, 23 Oct 2012 04:28:34 +0200, Siddhesh Poyarekar wrote:
> On Tue, 23 Oct 2012 03:58:35 +0200, Jan wrote:
> > The most easy would be to extend to 64-bit any automvaribles handling
> > TYPE_LENGTH (and some similar fields also being extended to 64-bit).
> > But this would include 64-bit lengths of scalar types which has been
> > considered as both performance wasteful and needless work to change
> > them all.
>
> Most of the warnings could be resolved by adding explicit casts
> wherever we know for sure that the value is safe to truncate.
This would be the case if we want to enable -Wconversion and also we want to
keep scalar types with 32-bit only variables.
While doable this is the most difficult variant to implement. One has to
properly verify all the callers/callees pass only scalar types and also never
forget to assert there only a scalar type has been passed - to prevent safety
regression with future changes.
Thanks,
Jan