commit | 9a338f8d256702a264df8ab0230e0d0f4019b9f4 | [log] [tgz] |
---|---|---|
author | Lev Walkin <vlm@lionet.info> | Sun Jan 22 16:38:37 2012 -0800 |
committer | Lev Walkin <vlm@lionet.info> | Sun Jan 22 16:38:37 2012 -0800 |
tree | 4374c138627a24587f6cc27d4bd642d9e885e3c0 | |
parent | e8727ec286439b8a00d0b312f156244f8fd88764 [diff] [blame] |
unbreak overflow detection in gcc 4.4.3 (4.x?)
diff --git a/skeletons/INTEGER.c b/skeletons/INTEGER.c index 5b10315..e7a5ba6 100644 --- a/skeletons/INTEGER.c +++ b/skeletons/INTEGER.c
@@ -396,7 +396,9 @@ } { - long new_value = value * 10; + long volatile new_value = value * 10; + /* GCC 4.x optimizes (new_value) without `volatile' + * so the following check does not detect overflow. */ if(new_value / 10 != value) /* Overflow */