This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/48118] New: g++ sometimes incorrectly allows copying a volatile trivially-copyable class
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 Mar 2011 18:40:21 +0000
- Subject: [Bug c++/48118] New: g++ sometimes incorrectly allows copying a volatile trivially-copyable class
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48118
Summary: g++ sometimes incorrectly allows copying a volatile
trivially-copyable class
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jason@gcc.gnu.org
As noticed in PR 48113, we fail to give an error for the call to f below even
though it involves copying a volatile object and A doesn't have a copy
constructor that allows a volatile argument.
struct A { };
void f (A);
void (*g)(A);
int main()
{
volatile A a;
f(a);
g(a);
}