https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97681

--- Comment #4 from Luke Dalessandro <ldalessandro at gmail dot com> ---
There are other occurrences of `a` that _are_ in `constexpr` context, it is
used in both contexts within the application thus the keyword is necessary. 

This report came from a testcase reduction, so I'll have to look into what's
going on in the real calling context (presumably it's *already* not `constexpr`
there so it might not be an issue in practice in that context).

I'd still suggest that a user that explicitly asks for `noinline`, even for a
`constexpr` function, would expect `noinline` to take precedence over constant
expression propagation, as the clang results provide. Perhaps some diagnostic
warning can be manifested if constant expression evaluation is overriding the
attribute?

Thanks for the explanation.

Reply via email to