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

Downcast for integral types under int #96

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

Comments

Projects
None yet
1 participant
@ochafik
Member

ochafik commented Sep 1, 2011

For the following C declaration:

#define MAXBYTE ((BYTE) 0xff)

jnaerator 0.9.6 is writing:

public static final byte MAXBYTE = (255);

which causes a java syntax error, since the int 255 should be downcast to fit a byte. The following output fixes the problem:

public static final byte MAXBYTE = (byte) (255);

Please note that any integral type under int (char, byte, short) will suffer the same issue.

Google Code Info:
Issue #: 80
Author: rsle...@gmail.com
Created On: 2011-02-18T14:56:32.000Z
Closed On:

@ghost ghost assigned ochafik Sep 1, 2011

@ochafik

This comment has been minimized.

Member

ochafik commented Sep 1, 2011

Hi again,

Thanks for this new report (hehe, nastier than the previous one ;-)).
Will investigate ASAP

Cheers

zOlive

Google Code Info:
Author: olivier.chafik
Created On: 2011-02-18T17:18:12.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