Re: -Wconversion producing incorrect warning

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

 



Hi Segher,

> The problem here is, that -Wconversion does _not_ warn about type conversions
in your code!

From: http://gcc.gnu.org/onlinedocs/gcc-4.0.2/gcc/Warning-Options.html

-------------------------------------------------------------------
-Wconversion

Warn if a prototype causes a type conversion that is different from what
would happen to the same argument in the absence of a prototype. This
includes conversions of fixed point to floating and vice versa, and
conversions changing the width or signedness of a fixed point argument
except when the same as the default promotion.

Also, warn if a negative integer constant expression is implicitly converted
to an unsigned type. For example, warn about the assignment x = -1 if x is
unsigned. But do not warn about explicit casts like (unsigned) -1.
-------------------------------------------------------------------

What kind of type conversions in your code are you referring to?

--Eljay


[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