Date: Wed, 14 Jan 2026 07:30:26 -0800
On Wednesday, 14 January 2026 06:57:00 Pacific Standard Time Frederick
Virchanza Gotham via Std-Proposals wrote:
> extern int &&CalleeFunction(void);
>
> int &&EnclosingFunction(void)
> {
> decltype(auto) x = CalleeFunction();
> if ( x ) return x;
> }
Compiles with GCC and Clang, albeit with a warning that it reaches the end of
a non-void function without a return. The old ICC (with the EDG front-end) and
MSVC don't like it:
https://gcc.godbolt.org/z/WcoEb8ehM
Virchanza Gotham via Std-Proposals wrote:
> extern int &&CalleeFunction(void);
>
> int &&EnclosingFunction(void)
> {
> decltype(auto) x = CalleeFunction();
> if ( x ) return x;
> }
Compiles with GCC and Clang, albeit with a warning that it reaches the end of
a non-void function without a return. The old ICC (with the EDG front-end) and
MSVC don't like it:
https://gcc.godbolt.org/z/WcoEb8ehM
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel Data Center - Platform & Sys. Eng.
Received on 2026-01-14 15:30:32
