Skip to content

Please diagnose on _Noreturn calls within [[gnu::const]], [[gnu::pure]], [[reproducible]], [[unsequenced]] #129022

Open
@alejandro-colomar

Description

@alejandro-colomar

Please diagnose on _Noreturn calls within the body of a function with any of these attributes: [[gnu::const]], [[gnu::pure]], [[reproducible]], [[unsequenced]].

This is UB, and could be easily diagnosed. I'd put it in -Wextra for the moment, to be careful.

Cc: @AaronBallman

Metadata

Metadata

Assignees

No one assigned

    Labels

    c23clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendLanguage frontend issues, e.g. anything involving "Sema"extension:gnu

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions