This is the mail archive of the gcc-patches@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: [PATCH] Add __int128 test to ubsan


On Tue, Dec 17, 2013 at 07:16:18PM +0100, Marek Polacek wrote:
> On Tue, Dec 17, 2013 at 06:50:24PM +0100, Jakub Jelinek wrote:
> > Isn't this undefined behavior in C?  I mean, shouldn't you
> > shift up (unsigned __int128) 1 and only cast to (__int128) at the end?
> 
> Oh my, how could I.
> 
> Yeah, (__int128) 1 << 127 is UB.  Fixed below, ok now?

Ok.

> 2013-12-17  Marek Polacek  <polacek@redhat.com>
> 
> testsuite/:
> 	* c-c++-common/ubsan/overflow-int128.c: New test.

	Jakub


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