Skip to content

inline + noinline warns although GCC does not #183

Closed

Description

@mborland

Reproducer:

//options_all:--gnu_version=150000 --diag_error=inline_gnu_noinline_conflict
inline __attribute__((noinline)) int f(int x) { return x; }
int g() { return f(1); }

Actual: warning #1625-D: routine is both "inline" and "noinline"

Expected: No diagnostic. GCC 11, 12, 14, and 15 (and Clang) accept this
silently with -Wall -Wextra.

Boost.System and others use the idiom BOOST_NOINLINE inline

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions