This is the mail archive of the gcc@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: Usage of -ftrapv



On Jun 16, 2006, at 5:43 PM, Paulo J. Matos wrote:



int main() {


unsigned int maxi = std::numeric_limits<unsigned int>::max();

maxi++;


This is well defined as unsigned overflow is defined as wrapping.

-- Pinski


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