[Bug c/17645] Add a warning for potentially unsafe unsigned operations

2006-08-07 Thread mathieu at malaterre dot com
--- Comment #11 from mathieu at malaterre dot com 2006-08-07 20:25 --- Tested today (Aug 7, 2006) with: $ /usr/lib/gcc-snapshot/bin/g++ --version /tmp g++ (GCC) 4.2.0 20060721 (experimental

[Bug c++/17645] Add a warning for potentially unsafe unsigned operations

2005-07-05 Thread mathieu at malaterre dot com
--- Additional Comments From mathieu at malaterre dot com 2005-07-06 02:32 --- Using gcc --version: g++ (GCC) 4.1.0 20050607 (experimental) I still cannot get anything using the -ftrapv: Ex is: #include iostream int main() { const unsigned int a = 11; const unsigned int b = 10

[Bug c++/17645] Add a warning for potentially unsafe unsigned operations

2005-07-05 Thread mathieu at malaterre dot com
--- Additional Comments From mathieu at malaterre dot com 2005-07-06 02:59 --- Using gcc --version: g++ (GCC) 4.1.0 20050607 (experimental) I can still reproduce the same unsafe operation: #include iostream int main() { unsigned int l = (unsigned int)-1; const int a = l/2

[Bug c/17645] Add a warning for potentially unsafe unsigned operations

2005-07-05 Thread mathieu at malaterre dot com
--- Additional Comments From mathieu at malaterre dot com 2005-07-06 03:00 --- Using gcc --version: g++ (GCC) 4.1.0 20050607 (experimental) I can still reproduce the same unsafe operation: #include iostream int main() { unsigned int l = (unsigned int)-1; const int a = l/2