[Bug c++/47695] New: [C++0X] Calling a deleted function fails twice

gcc at magfr dot user.lysator.liu.se gcc-bugzilla@gcc.gnu.org
Fri Feb 11 08:55:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47695

           Summary: [C++0X] Calling a deleted function fails twice
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gcc@magfr.user.lysator.liu.se


Compiling the following:

--- test.C ---
void f() = delete;
void g() { f(); }
---- ---

triggers the errors:

test.C: In function 'void g()':
test.C:2:12: error: use of deleted function 'void f()'
test.C:1:6: error: declared here
test.C:2:14: error: use of deleted function 'void f()'
test.C:1:6: error: declared here

and I understand that the first set is due to me referring to the symbol and
the second set is due to me calling it but I think one set of error messages
would be enough here.



More information about the Gcc-bugs mailing list