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: C++: No Warning for passing value > 255 as parameter to a function requiring "unsigned char"


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]