Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support undefined typedef union #215

Closed
wants to merge 3 commits into from

Conversation

rschwarz
Copy link

This is an attempt to fix #214.

Unfortunately, the tests did not pass for me, so I did not add any for this case yet.

 - does not actually have any fields
 - want the union to be represented as Cvoid
 - not sure if there is a more appropriate return value
@rschwarz
Copy link
Author

FYI, this is what fails for me:

function: Test Failed at /home/rs/.julia/dev/Clang/test/functions.jl:17
  Expression: defs == (nothing, -10)
   Evaluated: (Any[],) == (nothing, -10)

This is on Clang master with Julia 1.0.2.

 - the output for the union is not perfect, but it does not give an error
@rschwarz
Copy link
Author

Right now, typedef union uUnion UUNION will generate this:

struct uUnion
    _uUnion::Cvoid
end

const UUNION = Cvoid

Here, uUnion is not correct, but at least UUNION is there.

@Gnimuc
Copy link
Member

Gnimuc commented Dec 15, 2018

Fixed in #210, the result should be:

const uUnion = Cvoid
const UUNION = uUnion

@Gnimuc
Copy link
Member

Gnimuc commented Dec 23, 2018

closed in favor of #216

@Gnimuc Gnimuc closed this Dec 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error on undefined typedef union
2 participants