This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42302] New: compiler accepts calling private c++ constructor from outside of the class
- From: "csaba dot fekete at blck dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Dec 2009 19:29:46 -0000
- Subject: [Bug c++/42302] New: compiler accepts calling private c++ constructor from outside of the class
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hi,
The code below can be compiled without any complain from the compiler:
class A {
private:
A() {};
};
int main(int argc, char *argv[]) {
A a;
}
Thanks,
Csaba
--
Summary: compiler accepts calling private c++ constructor from
outside of the class
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: csaba dot fekete at blck dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42302