Skip to content

CWG3237 [cpp.predefined] __STDC_MB_MIGHT_NEQ_WC__ imposes no restrictions #1017

Description

@Halalaluyafail3

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

Reference (section label): [cpp.predefined]/2.7

Issue description:

The macro __STDC_MB_MIGHT_NEQ_WC__ is not referenced anywhere outside of [cpp.predefined] (not counting the index), and the text therein just talks about the intent if it is defined. There does not appear to be any requirements on code units if it is not defined like there is in C, so it appears that the macro has no actual purpose in C++. Either there should be wording added to enforce that 'x' and L'x' have the same value if __STDC_MB_MIGHT_NEQ_WC__ is not defined, or an entry should be added to [diff.cpp] that says __STDC_MB_MIGHT_NEQ_WC__ has no meaning in C++ if it is not defined.

Activity

  1. changed the title [-][cpp.predefined] \_\_STDC_MB_MIGHT_NEQ_WC\_\_ imposes no restrictions[/-] [+][cpp.predefined] __STDC_MB_MIGHT_NEQ_WC__ imposes no restrictions[/+] on Oct 1, 2026
  2. frederick-vs-ja commented on Oct 2, 2026

    @frederick-vs-ja

    The wording in [cpp.predefined]/2.7 looks fine to me as it's mostly copied from the C standard (see https://port70.net/~nsz/c/c23/n3220.html#6.10.10.3p1). IIUC we should add corresponding restrictions to [lex.charset].

  3. jensmaurer commented on Oct 5, 2026

    @jensmaurer
    Member
  4. changed the title [-][cpp.predefined] __STDC_MB_MIGHT_NEQ_WC__ imposes no restrictions[/-] [+]CWG3237 [cpp.predefined] __STDC_MB_MIGHT_NEQ_WC__ imposes no restrictions[/+] on Oct 5, 2026
  5. Halalaluyafail3 commented on Oct 5, 2026

    @Halalaluyafail3
    Author

    CWG3237

    That links to #1011 instead of this issue. The next issue should also link to #1012 instead.

  6. jensmaurer commented on Oct 5, 2026

    @jensmaurer
    Member

    Fixed

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