Skip to content

CWG3074 [cpp.module][cpp.import] Redundant ill-formedness for export/module/import macros #766

Description

@hubert-reinterpretcast

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

Reference (section label): [cpp.module], [cpp.import]

Link to reflector thread (if any): N/A

Issue description:

https://wg21.link/cpp.module#1 and https://wg21.link/cpp.import#1 impose diagnosable rules that are only violated in the presence of macro definitions of export, module, or import.

Such macro definitions are prohibited by https://wg21.link/cpp.replace.general#9.

Suggested resolution:

Strike https://wg21.link/cpp.module#1 and https://wg21.link/cpp.import#1:

A pp-module shall not appear in a context where module or (if it is the first preprocessing token of the pp-module) export is an identifier defined as an object-like macro.

A pp-import shall not appear in a context where import or (if it is the first preprocessing token of the pp-import) export is an identifier defined as an object-like macro.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions