Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: Brooks Moses <bmoses-nospam@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Mar 2007 22:09:03 -0700
glen herrmannsfeldt wrote:
Brooks Moses wrote:My interpretation would be that the standard isn't, per se, outlawing this _as an extension_. The behavior when an integer is out of range is undefined, and I think it would not be amiss for a compiler to adjust its range-checking to allow for this usage as a special case, considering assignments from a BOZ-literal to an integer to be out of range only when there are too many bits.
It could even allow it when there are too many bits, as far as I know.
It could. I would consider that a failure of the range-checking to act "as advertised", however -- what I meant there is not about what the standard allows (which is quite lenient), but what I'd consider to be a good quality of implementation within that.
I should also be clear that I think it's fine for compilers not to do constant range-checking, but I'm talking about the situation where one's asked (via a command-line option, or by not turning off one that's on by default) for ranges to be checked.
- Brooks
--
The "bmoses-nospam" address is valid; no unmunging needed.
.
- References:
- BOZ literal constants, a puzzle for us Standard-loving types.
- From: Toon Moene
- Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: Brooks Moses
- Re: BOZ literal constants, a puzzle for us Standard-loving types.
- From: glen herrmannsfeldt
- BOZ literal constants, a puzzle for us Standard-loving types.
- Prev by Date: Re: BOZ literal constants, a puzzle for us Standard-loving types.
- Next by Date: Re: BOZ literal constants, a puzzle for us Standard-loving types.
- Previous by thread: Re: BOZ literal constants, a puzzle for us Standard-loving types.
- Next by thread: funny variable names in gdb
- Index(es):
Relevant Pages
|