This is the mail archive of the gcc-help@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: -Wconversion producing incorrect warning


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]