signed/unsigned conversions

Chris Evans chris@scary.beasts.org
Wed Nov 8 08:09:00 GMT 2000


Hi,

Mailing gcc-bugs, sorry if it's an inappropriate address :)

Does gcc have a warning flag to warn if there are implicit conversions
between signed and unsigned variables? e.g. assigning an int to an
unsigned int, (or visa versa), be it explicitly or across a function call.

If gcc _does_ have this, what is the option? It is not documented in the
info => bug.

If it _doesn't_ have this, PLEASE PLEASE add it. It is a vital warning
flag to have for security purposes.

As an aside, many other compilers seem to have the ability to warn about
this condition.

If you have no objections, I'll forward the response to the security-audit
list, who are interested in this capability.

Thanks for your time,
Chris



More information about the Gcc-bugs mailing list