inducer / pycparserext

Extensions for Eli Bendersky's pycparser
http://pypi.python.org/pypi/pycparserext
Other
83 stars 29 forks source link

struct in a struct with __attribute__((packed)) #42

Open jackrosenthal opened 5 years ago

jackrosenthal commented 5 years ago

Support for either of these cases:

struct foo_t {
    struct __attribute__((packed)) {
        int a;
        char b;
    };
};
struct foo_t {
    struct {
        int a;
        char b;
    } __attribute__((packed));
};

I can work on an patch, but just posting an issue so it's documented.

inducer commented 5 years ago

Thanks for the report! I'd be happy to consider a patch, especially a reasonably well-tested one. :)