Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#1277 closed merge (fixed)

illegal chars accepted in literal strings

Reported by: malcolm.wallace@… Owned by:
Priority: normal Milestone: 6.8.1
Component: Compiler Version: 6.6
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: read033
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Ghc accepts literal tab characters inside literal strings, even though these are not permitted by Haskell'98. Example:

Prelude> "I" "\t" Prelude>

Other compilers correctly reject them:

nhc98> "I" Error at line 1, column 2: Tab in literal string/char. Use \t instead.

Change History (7)

comment:1 Changed 10 years ago by simonmar

Milestone: 6.6.2
Type: bugmerge

Fixed, need a test case and a merge:

Mon Apr 16 04:04:33 PDT 2007  Simon Marlow <simonmar@microsoft.com>
  * tab, verttab, formfeed, and CR are not allowed in strings

comment:2 Changed 10 years ago by simonmar

Test Case: read033

test added.

comment:3 Changed 10 years ago by simonmar

Resolution: fixed
Status: newclosed

comment:4 Changed 9 years ago by simonmar

Milestone: 6.6.26.8.1

comment:5 Changed 8 years ago by simonmar

Architecture: MultipleUnknown/Multiple

comment:6 Changed 8 years ago by simonmar

Operating System: MultipleUnknown/Multiple

comment:7 Changed 7 years ago by simonmar

difficulty: Easy (1 hr)Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.