Re: mixed-sign arithmetic and auto
walter@digitalmars-nospamm.com (Walter Bright) wrote (abridged):
Yes, C++ has been around for 20+ years. If a particular
characteristic of C++ compilers, allowed for by the standard, and
not too hard to implement, has not emerged in that time, then I
argue there is no significant interest in it.
I'd be interested. I've been hurt by int overflow bugs, and I'd have been
helped by a DEBUG option to trap it at run-time. (Or a RELEASE option, if
it didn't affect performance - there's no good reason to overflow int in
C++.)
I think to some extent these things go in fashion. I use a Microsoft
compiler, and it seems every new release has more and better
bug-detection. A feature which impacts performance becomes increasingly
likely to get supported as hardware gets faster. Also, in this case, as
hardware gets bigger. Now file systems and even address spaces bigger
than 32 bits are becoming common, so int overflows dealing with them are
more likely. Just because something hasn't been done in the past doesn't
mean it won't happen in the future.
I gather you are a compiler vendor, and didn't implement it because you
weren't aware the standard permitted it. So maybe now you know it's
allowed and that at least some users want it, you'll consider adding it
to your product? If not you, then perhaps other vendors reading this.
-- Dave Harris, Nottingham, UK.
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]