[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Dec 21 20:33:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
But it wouldn't be redundant for GCC, it would have a different, non-portable
meaning. Does it say "inline constexpr" because the code was written by someone
who likes redundancy for the sake of explicitness, or because somebody wants
the GCC-specific optimisation hint? If you have to add a comment to the code
saying "don't remove this keyword, it's here because it does something" then
the meaning is neither redundant, not explicit. It's non-obvious and an
implicit meaning not backed up by other compilers or the standard.
IMO the ideal solution is for GCC to stop using whether a function is inline as
an optimisation hint. Then we wouldn't need some extra GCC-specific way to
override that.
More information about the Gcc-bugs
mailing list