Yes, it's legal, but I can't recall that I have ever done it on purpose. Maybe that behaviour is defined just because it's better than the alternative of undefined behaviour?
Writing unit tests is a good recommendation though :-)
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 7 of 7
Thread: Validate unsigned operations?Threaded View
|
Click Here to Expand Forum to Full Width |