#12504: Windows: Using hsc2hs in combination with inline-c generates the .c files with invalid paths -------------------------------------+------------------------------------- Reporter: rcook | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: hsc2hs | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: | /testsuite/tests/hsc2hs/T12504/path/to/T12504.hsc Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2478 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"2ee1db60ab29258fa9f8ab820f778bd0bb7f87a4/ghc" 2ee1db60/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="2ee1db60ab29258fa9f8ab820f778bd0bb7f87a4" Fixes #12504: Double-escape paths used to build call to hsc_line In outHsLine, paths passed to construct invocations of hsc_line must be escaped twice in order to generate a properly escaped string literal that will end up in the eventual LINE pragma emitted by this code. This is especially important on Windows paths, where backslashes would otherwise be treated as C escape sequences and result in the incorrect Windows paths. Adds test case to verify that hsc2hs properly escapes file paths in LINE pragmas Updates the hsc2hs submodule. See https://ghc.haskell.org/trac/ghc/ticket/12504 Reviewers: erikd, hvr, austin, bgamari, Phyx Reviewed By: erikd, Phyx Subscribers: thomie, Phyx, mpickering Differential Revision: https://phabricator.haskell.org/D2478 GHC Trac Issues: #12504 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12504#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler