Skip to content

[defns.undefined] Incorrect/incomplete note referencing [expr.const] CWG2924 #7042

Description

@eisenwave

[defns.undefined] Note 1 states:

Evaluation of a constant expression ([expr.const]) never exhibits behavior explicitly specified as undefined in [intro] through [cpp].

This is incorrect or at least incomplete. The sentence is in reference to [expr.const] p5.8:

an operation that would have undefined or erroneous behavior as specified in [intro] through [cpp], excluding [dcl.attr.assume] and [dcl.attr.noreturn];

Either we should remove the last sentence from the [defns.undefined] note (in older standards, that note didn't exist anyway, and I don't think it's all that important to have it there), or we should complete it by mentioning the exclusion of [dcl.attr.assume] and [dcl.attr.noreturn].

Activity

  1. frederick-vs-ja commented on Nov 10, 2025

    @frederick-vs-ja
    Contributor

    Resolved by #7458 (011e687).

  2. changed the title [-][defns.undefined] Incorrect/incomplete note referencing [expr.const][/-] [+][defns.undefined] Incorrect/incomplete note referencing [expr.const] CWG2924[/+] on Nov 10, 2025
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

    P2-BugPresentational errors and omissions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions