This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/22200] numeric_limits<signed>::is_modulo is inconsistend with gcc
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jun 2005 21:02:43 -0000
- Subject: [Bug libstdc++/22200] numeric_limits<signed>::is_modulo is inconsistend with gcc
- References: <20050627151911.22200.veksler@il.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-27 21:02 -------
(In reply to comment #21)
> 1. Sometimes using "undefined" simplifies the compiler and improves
> generated code.
> 2. (OTOH) Undefind situations are unhelpful the the users, they complicate
> debugging, and make programming harder. Reducing rules that imply
> undefined behavior semantics is good for the users.
No I disagree with that, most undefined behaviors are very easy to debug,
the most obvious one and most invoked undefined behavior in terms of bug
reports is violating C/C++ aliasing rules (see PR 21920 which has 69 duplicates).
In fact if you look at GCC, it is the only compiler were people run into violating C/C++
aliasing rules beause we use them to check if two addresses can alias. This is unlike almost all other
compilers which represent their aliasing info as base+address and they only invoke the C/C++ aliasing
rules when they cannot figure out if they point to the same address.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22200