Skip to content

[cpp.replace.general] Macro redefinitions that do not use the final ellipsis consistently #999

Description

@Halalaluyafail3

Full name of submitter (unless configured in github; will be published with the issue): Jay Ghiron

Reference (section label): [cpp.replace.general]/2

Issue description:

This issue is a duplicate of C Issue 1066. The current wording is insufficient to forbid the following macro definitions:

#define F(X)
#define F(X,...)

Suggested resolution:

Modify [cpp.replace.general]/2:

Likewise, an identifier currently defined as a function-like macro (see below) may be redefined by another #define preprocessing directive provided that the second definition is a function-like macro definition that has the same number and spelling of parameters, the two definitions agree in use of the final ellipsis, and the two replacement lists are identical, otherwise the program is ill-formed.

Activity

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

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