https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107132
Bug ID: 107132
Summary: a temporary object with an x-value is not destroyed
and is bound to a variable
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
Severit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109529
Bug ID: 109529
Summary: the r-value volatile object is not accepted by the
l-value volatile constant argument.
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109529
--- Comment #3 from Lisp2D ---
(In reply to Andrew Pinski from comment #2)
> Since `static_cast(x)` is considered rvalue and `int
I can't find a reason anywhere in the standard why the volatile property
prevents conversion from `&&` to `const &`
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109529
--- Comment #6 from Lisp2D ---
(In reply to Andrew Pinski from comment #4)
> https://stackoverflow.com/questions/40193008/why-a-const-volatile-reference-
stackoverflow offers to link an rvalue reference to a variable for this. But I
think this
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109529
--- Comment #7 from Lisp2D ---
.. or
int volatile && rx = static_cast < int volatile && > ( x ) ;
fun(rx);