This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Do CO++ signed types have modulo semantics?
- From: Paul Schlie <schlie at comcast dot net>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Wed, 29 Jun 2005 10:59:24 -0400
- Subject: Re: Do CO++ signed types have modulo semantics?
> From: Daniel Berlin <dberlin@dberlin.org>
>> Overall, I guess I still simply believe the the first rule of optimization
>> is to preserve existing semantics unless explicitly authorized otherwise,
>> and then only if accompanied with corresponding warnings for all potentially
>> behavior altering assumptions applied.
>
> It is, you just believe that semantics exist where they don't.
- Agreed, I do believe that an implementation should strive to define
likely useful and consistent behaviors for those which the standard
has defined as being undefined.
As an implementation which chooses not define a specific behavior for one
specified as being undefined, which it may, as an undefined behavior may
invoke any behavior, then it remains undefined. And may correspondingly
yield an truly undefined resulting behavior if ever presumed to differ
from the factual behavior which the compiler would otherwise produce;
therefore of likely dubious value.