Re: Warning for non-portable integer operations?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 11, 2009 at 12:04 AM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
> Mark Dickinson <dickinsm@xxxxxxxxx> writes:
>
>> Is there any gcc warning available that would
>> warn about the following C code, which gives
>> different results depending on the platform:
>
> -Wconversion

Thanks.  It's not quite what I was looking for, since it still doesn't
give any warning on LP64 machines, and on ILP32 it's warning
about the comparison rather than the arithmetic operation.  But
I guess I'll live. :)  I suppose it doesn't really make sense for
gcc to warn about possible problems on a platform different from
the one it's targeting.

This seems like the sort of thing that 3rd party static-analysis
tools would do well, but the only one that I tried (splint) failed to
parse the various non-standards-compliant systems header files,
so never got as far as the code I was interested in...

Mark

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux