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

Unnamed (not anonymous) unions and structs not supported yet #94

Closed
ochafik opened this Issue Sep 1, 2011 · 3 comments

Comments

Projects
None yet
1 participant
@ochafik
Member

ochafik commented Sep 1, 2011

(issue was reported on StackOverflow.com :
http://stackoverflow.com/questions/2503183/jnaerator-unnamed-union-missing-
in-structure)

What steps will reproduce the problem?

Generate the following code :

typedef struct S {
union {
int var1;
double var2;
};
} S;

What is the expected output? What do you see instead?

Expect union to be given a name, then S and that union to be properly
generated.

Instead : gives an empty S struct.
Solved if naming the union :

typedef struct S {
union U {
int var1;
double var2;
};
} S;

Google Code Info:
Issue #: 60
Author: olivier.chafik
Created On: 2010-04-14T17:49:02.000Z
Closed On:

@ghost ghost assigned ochafik Sep 1, 2011

@ochafik

This comment has been minimized.

Member

ochafik commented Sep 1, 2011

As pointed out on the StackOverflow page, the issue is not about anonymous unions/structs but about unnamed
ones.

Unnamed structs and unions are not standard C, but JNAerator should nevertheless support them as GCC does :

http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gcc/unnamed-fields.html

Google Code Info:
Author: olivier.chafik
Created On: 2010-04-16T01:10:18.000Z

@ochafik

This comment has been minimized.

Member

ochafik commented Sep 1, 2011

Google Code Info:
Author: olivier.chafik
Created On: 2010-04-16T01:10:53.000Z

@ochafik

This comment has been minimized.

Member

ochafik commented Apr 14, 2012

Fixed in 0.9.10-SNAPSHOT

@ochafik ochafik closed this Apr 14, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment