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

Cake fails to find a member stored in an anonymous struct or union #217

Open
ArthurPV opened this issue Dec 25, 2024 · 0 comments
Open

Cake fails to find a member stored in an anonymous struct or union #217

ArthurPV opened this issue Dec 25, 2024 · 0 comments

Comments

@ArthurPV
Copy link

ArthurPV commented Dec 25, 2024

Input:

// a.c
struct X {
	union {
		int x;
	};
};

int main() {
	struct X x = (struct X){ .x = 50 };
}

Output:

$ ./cake -std=c2x a.c

Cake 0.9.43
/home/user/cake/src/a.c
/home/user/cake/src/a.c:8:28: error: member 'x' not found in 'X' [E720]
 8 |	struct X x = (struct X){ .x = 50 };
   |                           ~

 1 files in 0.00 seconds
 1 errors 0 warnings 0 notes
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

No branches or pull requests

1 participant