[Haskell-cafe] c2hs failed to process __extension__

向井 淳 mukai at jmuk.org
Mon Jan 29 07:25:44 EST 2007


Hello all,

I have a trouble when compiling a program with c2hs.
The program can be seen at http://www.city5.org/prog/hstraier/, which  
is a binding with HyperEstraier (a fulltext search system).

When I compile it at FreeBSD 6.2, I encountered the following error:

| % runghc Setup.hs build
| Preprocessing library hstraier-0.2...
| c2hs: Error in C header file.
|
| /usr/include/machine/endian.h:146: (column 25) [FATAL]
|   >>> Syntax error!
|   The symbol `{' does not fit here.

 From the dumped file Node.i (you can see from http://www.city5.org/ 
Node.i), the error line is as follows:
| return (__extension__ ({ register __uint32_t __X = (_x); __asm  
("bswap %0" : "+r" (__X)); __X; }));

c2hs fails to process __extension__?

 From the changelog, c2hs now can understand __extension.
Is this an exceptional case?


Best Regards,
Jun Mukai
mukai at jmuk.org



More information about the Haskell-Cafe mailing list