public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109529] New: the r-value volatile object is not accepted by the l-value volatile constant argument.
@ 2023-04-16  6:42 lisp2d at rambler dot ru
  2023-04-16  6:51 ` [Bug c++/109529] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: lisp2d at rambler dot ru @ 2023-04-16  6:42 UTC (permalink / raw)
  To: gcc-bugs

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
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lisp2d at rambler dot ru
  Target Milestone: ---

void funy(int const &){}
void fun(int volatile const &){}
int main(){
  int y ;
  funy(y); // good
  funy(static_cast<int && >(y)); // good
  funy(static_cast<int const && >(y)); // good
  int volatile x ;
  fun(x); // good
  fun(static_cast<int volatile && >(x)); // error
  fun(static_cast<int volatile const && >(x)); // error
}

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-04-16 10:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-16  6:42 [Bug c++/109529] New: the r-value volatile object is not accepted by the l-value volatile constant argument lisp2d at rambler dot ru
2023-04-16  6:51 ` [Bug c++/109529] " pinskia at gcc dot gnu.org
2023-04-16  6:58 ` pinskia at gcc dot gnu.org
2023-04-16  7:49 ` lisp2d at rambler dot ru
2023-04-16  7:58 ` pinskia at gcc dot gnu.org
2023-04-16  8:26 ` pinskia at gcc dot gnu.org
2023-04-16  9:08 ` lisp2d at rambler dot ru
2023-04-16 10:34 ` lisp2d at rambler dot ru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).