This is the mail archive of the gcc-bugs@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]

[Bug libstdc++/22200] numeric_limits<signed>::is_modulo is inconsistend with gcc


------- 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


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