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

Parse error on function with attribute returning a pointer #6

Open
asciiiii opened this issue Dec 21, 2013 · 1 comment
Open

Parse error on function with attribute returning a pointer #6

asciiiii opened this issue Dec 21, 2013 · 1 comment

Comments

@asciiiii
Copy link

This code is OK:

int __attribute__((__nothrow__)) fct() {}

but this one failed:

int * __attribute__((__nothrow__)) fct() {}

Error given is:
pycparser.plyparser.ParseError: :1:7: before: __attribute__

I tried to fix this bug myself, without success.

I discovered that when trying to parse stdio.h from Mingw.
Preprocessed sample:

  __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _fsopen(const char *_Filename,const char *_Mode,int _ShFlag);
@inducer
Copy link
Owner

inducer commented Dec 22, 2013

Thanks for reporting this issue. I unfortunately do not have the spare cycles to debug this at this moment, but I'd be happy to take a patch.

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

2 participants