Skip to content

Parse error on function with attribute returning a pointer #6

@asciiiii

Description

@asciiiii

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions