This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: C++: No Warning for passing value > 255 as parameter to a function requiring "unsigned char"
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Martin Wodok <m dot wodok at osb-ag dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 22 Jul 2005 16:46:24 +0200
- Subject: Re: C++: No Warning for passing value > 255 as parameter to a function requiring "unsigned char"
- References: <200507221551.02486.m.wodok@osb-ag.de>
Martin Wodok <m.wodok@osb-ag.de> writes:
| Assigning 1000 is of course out of bounds for "unsigned char", thus the
No, it is not. Unsigned integer types are modulo types; it is no overflow.
-- Gaby