Rainer Orth <r...@cebitec.uni-bielefeld.de> writes: >>> Apart from that, why are you invoking gcc with -x assembler-with-cpp >>> when the input is clearly anything but assembler input? You're >>> obviously lying to the compiler, and I'd go as far as claiming that you >>> get what you deserve: garbage in, garbage out. >> >> :-) fair enough, but GHC requires to use some CPP and GNU C's provided >> one is very comfortable. Well, at least except on Solaris as you >> see... > > But why the -x assembler-with-cpp instead of plain -E?
-E applies C tokenisation rules, so isn't a good idea for non-C input. E.g.: #define X(A, B) A##B X(<,>) gives an error for plain -E but is OK with -x assembler-with-cpp. (I've no idea whether <> is a valid Haskell token.) Thanks, Richard