[Issue 786] New: the \ EndOfFile EscapeSequence in double-quoted strings doesn't work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 2 18:35:47 PST 2007


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

           Summary: the \ EndOfFile EscapeSequence in double-quoted strings
                    doesn't work
           Product: D
           Version: 0.178
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid, spec
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: thecybershadow at gmail.com


Spec non-conformacy, I believe.

Spec: http://www.digitalmars.com/d/lex.html#StringLiteral

Program:

void main()
{
  char[] eof_literal = "\";  // the character after the backslash is \u001A,
as per the specs
}

Compiler output:

C:\...>dmd lexical.d
lexical.d(3): unterminated string constant starting at lexical.d(3)
lexical.d(3): semicolon expected, not 'EOF'
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement
lexical.d(3): found 'EOF' instead of statement

(that's 19 repeating lines)


-- 



More information about the Digitalmars-d-bugs mailing list