[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-c2hs
Subject:    Re: [C2hs] Re: [Haskell-cafe] c2hs failed to process __extension__
From:       Duncan Coutts <duncan.coutts () worc ! ox ! ac ! uk>
Date:       2007-02-19 1:44:18
Message-ID: 1171849458.1018.166.camel () localhost
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic