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

Pragmas in enum declaration raise error #416

Open
corradods opened this issue May 26, 2021 · 1 comment
Open

Pragmas in enum declaration raise error #416

corradods opened this issue May 26, 2021 · 1 comment

Comments

@corradods
Copy link

corradods commented May 26, 2021

Hello,
Pycpaser raise a parser error when i try to parse this. It seems pragma are not allowed inside enum types declaration (both the cases). It is possible to fix this, letting the pragma survive to the parsing? The code can be compiled and executed without any problem. I read around this should be c99 compliant.

enum E {
A,
#pragma MYPRAGMA
Z};

enum E2 {
#pragma MYPRAGMA
X, Y};
void main() {
;
}

@corradods corradods changed the title Pragma in enum declaration raise error Pragmas in enum declaration raise error May 26, 2021
@eliben
Copy link
Owner

eliben commented May 27, 2021

Yep, pragmas aren't supported within enums now. PRs welcome

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

No branches or pull requests

2 participants