haskell / c2hs

c2hs is a pre-processor for Haskell FFI bindings to C libraries
http://hackage.haskell.org/package/c2hs
Other
199 stars 50 forks source link

Support GCC extension that allows unnamed struct and union members per C11. #233

Closed dpreed closed 5 years ago

dpreed commented 5 years ago

Contribute code the supports unnamed struct and union fields within structs and unions, which is in the C11 spec. The names in the nested struct can be used without qualification in the CHS bindings.

Also added regression tests (issue 230) for unnamed struct/union membes.

deech commented 5 years ago

This is great! Thanks!