Re: [GHC] #3389: CPP strips out C-style comments

#3389: CPP strips out C-style comments -------------------------------------+------------------------------------ Reporter: nominolo | Owner: igloo Type: feature request | Status: closed Priority: normal | Milestone: 7.0.1 Component: Driver | Version: 6.10.2 Resolution: wontfix | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: T3389 | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by int-e): T3389 currently fails for me (x86_64 Debian Linux): {{{ =====> T3389(normal) 956 of 3773 [0, 1, 0] cd ./driver && '/space/home/bf3/src-hs/ghc/bindisttest/install dir/bin/ghc' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no- user-package-db -rtsopts -fno-ghci-history -o T3389 T3389.hs
T3389.comp.stderr 2>&1 Compile failed (status 256) errors were: [1 of 1] Compiling Main ( T3389.hs, T3389.o )
/usr/include/stdc-predef.h:1:1: parse error on input `/*' *** unexpected failure for T3389(normal) }}} Apparently {{{gcc -E}}} now automatically includes the file {{{/usr/include/stdc-predef.h}}}. There is a mailing list thread at http://www.eglibc.org/archives/patches/msg01262.html which suggests that passing {{{-ffreestanding}}} will avoid that. The workaround would then be {{{ {-# OPTIONS_GHC -optP -C -optP -ffreestanding #-} }}} Versions: {{{
gcc --version gcc (Debian 4.8.1-9) 4.8.1 /lib/x86_64-linux-gnu/libc.so.6 GNU C Library (Debian EGLIBC 2.17-92+b1) stable release version 2.17, by Roland McGrath et al. }}}
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/3389#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC