This is the mail archive of the gcc@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: pointer <-> integer conversion warnings (bogus -Wall warnings)


> No.
> 
> Here's the rule I suggest for warnings about conversions between
> values of unequal width that I think makes sense for -Wall:
> 
> 	When a default conversion is implied by the code and that
> 	conversion is potentially lossy (on any architecture),
> 	generate a warning.

What I suggested was an explicit double cast!

Default conversions are irrelevant, other than justifying your error.

-Tim


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