[GHC] #4340: Add alignment to hsc2hs template

GHC cvs-ghc at haskell.org
Sat Sep 25 18:19:43 EDT 2010


#4340: Add alignment to hsc2hs template
---------------------------------+------------------------------------------
    Reporter:  mitar             |       Owner:                
        Type:  feature request   |      Status:  new           
    Priority:  normal            |   Component:  Compiler (FFI)
     Version:  6.12.3            |    Keywords:                
    Testcase:                    |   Blockedby:                
          Os:  Unknown/Multiple  |    Blocking:                
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown  
---------------------------------+------------------------------------------
 I think
 [http://www.haskell.org/haskellwiki/FFICookBook#Working_with_structs
 commonly used]:

 {{{
 #let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t
 (y__); }, y__)
 }}}

 should be added to official hsc2hs template. What are cons to that?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4340>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list