Skip to content

Support "named" variadic macros #164

@jefftrull

Description

@jefftrull

This piece of code appears in recent Ubuntu distributions, in /usr/include/linux/stddef.h:

#define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \
        union { \
                struct { MEMBERS } ATTRS; \
                struct TAG { MEMBERS } ATTRS NAME; \
        }

The gcc manual notes that names other than __VA_ARGS__ - in this case, MEMBERS - may be used to refer to the variadic arguments "as an extension". Given the ubiquity of this header it may be useful to add support for this extension.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions