[Haskell-cafe] Dread __DISCARD__

Wolfgang Thaller wolfgang.thaller at gmx.net
Sat Sep 17 12:14:11 EDT 2005

> I'm on Mac OS 10.4.2, using ghc 6.4 (from the haskell.org .dmg) and
> gcc 4.0.0.  Other wxHaskell programs (the samples and my own
> experiments) compile without tripping over this.

GHC 6.4 is incompatible with gcc 4.0.0 when -O or -via-C is used.
You can work around this problem by either not using -via-C and  
always adding -fasm *after* -O, or by setting your default compiler  
to gcc-3.3 using
sudo gcc_select 3.3
... but be aware that this also affects other C compilations; switch  
back using
sudo gcc_select 4.0

I suspect that you compiled the program with -O before, and then  
switched to -O0 without removing your .o files. If you compiled  
wxHaskell yourself, then the problem might also be in wxHaskell  
(you'd have to recompile it then).

The upcoming GHC 6.4.1 will of course fix this problem.



More information about the Haskell-Cafe mailing list