Skip to content

g++14 complains about redundant redeclaration when using redundant-decls parameter #1697

@ArashPartow

Description

@ArashPartow

Diagnostic:

[build] /home/bob.cob/workspace/extra/top/secret/thirdparty/asio/error.hpp:361:32: error: redundant redeclaration of 'std::error_condition asio::error::detail::error_number_to_condition(int)' in same scope [-Werror=redundant-decls]
[build]   361 | ASIO_DECL std::error_condition error_number_to_condition(int ev);
[build]       |                                ^~~~~~~~~~~~~~~~~~~~~~~~~
[build] /home/bob.cob/workspace/extra/top/secret/thirdparty/asio/include/asio/impl/error_code.ipp:38:32: note: previous declaration of 'std::error_condition asio::error::detail::error_number_to_condition(int)'
[build]    38 | ASIO_DECL std::error_condition error_number_to_condition(int ev);
[build]       |                                ^~~~~~~~~~~~~~~~~~~~~~~~~

Compilers: g++ 14.2/15.2
asio commit: 55684d4


Tried commenting out the decl in the .ipp but that triggered other issues.

That being said, Clang versions 15-22 don't complain with the same set of compiler switches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions