[Issue 1865] Escape sequences are flawed.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 25 09:21:39 PST 2008


http://d.puremagic.com/issues/show_bug.cgi?id=1865





------- Comment #3 from aziz.kerim at gmail.com  2008-02-25 11:21 -------
(In reply to comment #2)
> On 24/02/2008, d-bugmail at puremagic.com <d-bugmail at puremagic.com> wrote:
> The whole point is to define a BYTE, after all.

Good objection. I think we could compare this to Unicode escape sequences. The
compiler complains when you specify values higher than \U0010FFFF (highest
codepoint.) Likewise, the compiler should probably give an error for octal
escape sequences higher than \377.
At the moment, it doesn't feel quite right that anything higher than \377 is
silently treated as 0xFF. Other languages apparently don't report an error or
throw an exception, but I vote that a D compiler should report one.


-- 



More information about the Digitalmars-d-bugs mailing list