# C and bits types confusion

**URL:** https://discourse.julialang.org/t/c-and-bits-types-confusion/1168
**Category:** General Usage
**Tags:** question, ccall
**Created:** [December 27, 2016, 7:48pm UTC](https://discourse.julialang.org/t/c-and-bits-types-confusion/1168 "2016-12-27T19:48:22Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)
#### Post date: [December 27, 2016, 11:11pm UTC](https://discourse.julialang.org/t/c-and-bits-types-confusion/1168/4 "2016-12-27T23:11:05Z")

</div>

enum is not a struct. It’s simply a constant integer in C so you should just pass it as such. Note that the size of `enum` is actually implementation defined (unless explicitly specified in c++11) so matching with a julia enum may not work. Using a integer type with the same size as the one returned by clang should work.

---

_[View the full topic](https://discourse.julialang.org/t/c-and-bits-types-confusion/1168)._
