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

Re: Should GCC publish a general rule/warning due to it's default presumption of undefined signed integer overflow semantics?


Joe Buck <Joe.Buck@synopsys.COM> writes:

[...]

| Given your biases, you might be happier with Java as a language (than C or
| C++).  The Java language designers decided to strictly define many cases
| that are not defined in C (example: the order side effects is always
| strictly left to right, floating point is always IEEE, etc., integer
| overflow wraps around).  There is a performance penalty for this, but
| given the "write once, run everywhere" goal it was felt that it's worth
| paying this price.

Well, in the case of C++ I can say that the designer and original
implementor of C++ is quite amazed as to how people interpret
"undefined behaviour" in this thread.  I don't think he would suggest
that people go to use Java instead.

-- Gaby


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