Skip to content

Commit

Permalink
Add warning message for "packed" enums
Browse files Browse the repository at this point in the history
X-ref #224
  • Loading branch information
Gnimuc committed Feb 25, 2019
1 parent a676920 commit 02a7960
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wrap_c.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function wrap!(ctx::AbstractContext, cursor::CLEnumDecl)
name2value = Tuple{Symbol,Int}[]
# extract values and names
for item_cursor in children(cursor)
kind(item_cursor) == CXCursor_PackedAttr && (@warn("this is a `__attribute__((packed))` enum, the underlying alignment of generated structure may not be compatible with the original one in C!"; continue)
item_name = spelling(item_cursor)
isempty(item_name) && continue
item_sym = symbol_safe(item_name)
Expand Down

0 comments on commit 02a7960

Please sign in to comment.