Skip to content

Unused-parameter warning with -fno-exceptions #3114

@BartolomeyKant

Description

@BartolomeyKant

Describe the bug

clang 22 with flag -fno-exceptions

catch2/catch_translate_exception.hpp:32:73: error: unused parameter 'it' [-Werror,-Wunused-parameter]
   32 |             std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override {

Expected behavior
it and itEnd should be marked with [[maybe-unused]] and do not signal -Wunused-parameter

Reproduction steps
Compile tests with -fno-exceptions
I do it on stdexec repo https://github.com/NVIDIA/stdexec

Platform information:
OS: Linux
compiler: clang 22.1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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