From bc6a3e654add2eb955472210866d5dd87bee4f54 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Wed, 30 Jun 2021 16:45:06 +0800 Subject: [Parser: Lexer] Fix !6132 clang's cpp injects spaces prior to #!/. --- compiler/GHC/Parser/Lexer.x | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/GHC/Parser/Lexer.x b/compiler/GHC/Parser/Lexer.x index 7c9b951eba..2881e44e90 100644 --- a/compiler/GHC/Parser/Lexer.x +++ b/compiler/GHC/Parser/Lexer.x @@ -283,7 +283,8 @@ $tab { warnTab } ^\# line { begin line_prag1 } ^\# / { followedByDigit } { begin line_prag1 } ^\# pragma .* \n ; -- GCC 3.3 CPP generated, apparently - ^\# \! .* \n ; -- #!, for scripts + ^\# \! .* \n ; -- #!, for scripts -- gcc + ^\ \# \! .* \n ; -- #!, for scripts -- clang; See #6132 () { do_bol } } -- cgit v1.2.1