* Jakub Jelinek:

> +@cindex @code{constexpr_only} function attribute
> +@item constexpr_only
> +The @code{constexpr_only} attribute can be applied to a @code{constexpr} 
> function
> +declaration.  When the function is defined, the function body is only used
> +for C++ constant evaluation purposes, otherwise the function definition is
> +treated as a external declaration.  If the function is called or has its
> +address taken and such reference is not optimized away, external definition
> +without the attribute still needs to be provided in some other translation
> +units.  When used on a @code{virtual constexpr} method, such a method can be
> +still a key method of the class.  This attribute is intended mainly for
> +functions which were intentionally defined out of line in libraries for
> +optimization (e.g.@: because the function is very large), key method or ABI
> +reasons but later on are required or desirable to be evaluable in constant
> +expressions.

Does this mean that no IPA is performed with the knowledge of the body?

ABI-wise, how does this interact with compilers that do not support
the attribute if it is used in the intended way?  Can the function
still be made constexpr for those compilers?

Reply via email to