Re: [Haskell-cafe] c2hs failed to process __extension__

On Mon, 2007-01-29 at 21:25 +0900, 向井 淳 wrote:
c2hs fails to process __extension__?
From the changelog, c2hs now can understand __extension. Is this an exceptional case?
Did you try the very latest darcs version of c2hs? Yesterday I added a couple patches that try to cope with more uses of __extension. Duncan

On Mon, 2007-01-29 at 12:55 +0000, Duncan Coutts wrote:
On Mon, 2007-01-29 at 21:25 +0900, 向井 淳 wrote:
c2hs fails to process __extension__?
From the changelog, c2hs now can understand __extension. Is this an exceptional case?
static __inline __uint32_t __bswap32(__uint32_t _x) { return (__extension__ (({ register __uint32_t __X = (_x); __asm ("bswap %0" : "+r" (__X)); __X; }))); } My new c2hs C parser can parse your example and indeed the whole of that Node.i file that you posted. The GNU C extensions required were not just the __extension__ expression but also compound statements as expressions. The asm statement extension was already implemented. So when I get this new parser into the mainline c2hs you should try again. Duncan
participants (1)
-
Duncan Coutts