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

macro used in struct declaration not translated properly #166

Closed
atilaneves opened this issue Aug 15, 2017 · 0 comments
Closed

macro used in struct declaration not translated properly #166

atilaneves opened this issue Aug 15, 2017 · 0 comments
Labels

Comments

@atilaneves
Copy link

C code:

#define __FSID_T_TYPE struct { int __val[2]; }
typedef  __FSID_T_TYPE __fsid_t;
typedef __fsid_t fsid_t;

Right now produces this:

extern (C):
 
struct __fsid_t
{
    int[__FSID_T_TYPE] __val;
}
 
alias fsid_t = __fsid_t;

The correct code would be:

extern (C):

struct __fsid_t
{
    int[2] __val;
}

alias fsid_t = __fsid_t;
atilaneves pushed a commit to atilaneves/dstep that referenced this issue Aug 15, 2017
atilaneves pushed a commit to atilaneves/dstep that referenced this issue Nov 18, 2017
atilaneves added a commit to atilaneves/dstep that referenced this issue Nov 18, 2017
jacob-carlborg added a commit that referenced this issue Nov 27, 2017
Fix #166 - take array constant token into account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants