This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12226] [3.3 Regression] g++ fails to enforce accessibility requirement for copy constructor
- From: "dbaron at dbaron dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jan 2004 22:52:06 -0000
- Subject: [Bug c++/12226] [3.3 Regression] g++ fails to enforce accessibility requirement for copy constructor
- References: <20030909174601.12226.austern@apple.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dbaron at dbaron dot org 2004-01-05 22:52 -------
Before I go fix Mozilla to deal with this
( http://bugzilla.mozilla.org/show_bug.cgi?id=230118 ), I just want to
double-check that this change was intended to apply to calls to functions taking
reference types in addition to initialization of reference variables. That is,
the program:
class C {
public: C() {}
private: C(const C&) {}
};
void f(const C& c) { }
int main()
{
f(C());
return 0;
}
now yields an error.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |dbaron at dbaron dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12226