This is the mail archive of the
mailing list for the GCC project.
Re: [Patch] Conversion warnings when truncating 64-bit types (v1)
DJ Delorie wrote:
Could we figure out how to trigger these warnings on platforms where
__w64__ happens to be 32 bits? I.e. detect 64 bit portability issues
on 32 bit platforms?
Indeed, the __w64__ attribute can (and should be) added to size_t-ish
types even on a 32-bit platform; the warning is generated when a
w64 value is assigned to a non-w64 type shorter than 64 bits, so it
will get generated on a 32-bit platform as well.
This was, in fact, the primary motivation for suggesting this feature:
you don't need access to 64-bit hardware to test this aspect of