This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
signed/unsigned conversions
- To: gcc-bugs at gcc dot gnu dot org
- Subject: signed/unsigned conversions
- From: Chris Evans <chris at scary dot beasts dot org>
- Date: Wed, 8 Nov 2000 16:08:27 +0000 (GMT)
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