Extracted from this commit without the ChangeLog to avoid conflicts: http://git.savannah.gnu.org/cgit/smalltalk.git/commit/?id=72ada189aba0283c551ead16635c1983968080b8 The upstream commit message is From 72ada189aba0283c551ead16635c1983968080b8 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 7 Nov 2015 18:09:31 +0100 Subject: libgst: Add alternative multiplication overflow check Apple clang on OSX and the version on FreeBSD optimize the multiplication check away. Clang introduced a family of builtins to do the multiplication and check for the overflow and GCC made the API usable. For clang we would need to know if intptr_t is of type int, long int, long long int and then use the smul, smull smulll. Luckily clang is adopting the better interface and this is what we are starting to use now. This means the new code will be used on GCC5 (and later) and some future versions of clang. 2015-11-07 Holger Hans Peter Freyther
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>