diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-01-04 22:42:22 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-01-04 22:42:22 +0000 |
commit | 4f8163b19cd1e0b4e5d3e10426d08ad1e54cf1ed (patch) | |
tree | 2f162239ad6abe8e01544300565821a85d22ac4b /libstdc++-v3/testsuite/27_io/basic_ios | |
parent | 5a4b3afd3de39682fec1cc2a5d3fb94b6df972c7 (diff) | |
download | gcc-4f8163b19cd1e0b4e5d3e10426d08ad1e54cf1ed.tar.gz |
re PR c++/12226 (g++ fails to enforce accessibility requirement for copy constructor)
PR c++/12226
* call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
(reference_binding): Set it when appropriate.
(build_temp): New function, split out from ...
(convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
(initialize_reference): Likewise.
PR c++/12226
* g++.dg/init/copy7.c: New test.
PR c++/12226
* testsuite/27_io/basic_filebuf/4.cc: Remove use of invalid copy
constructor.
* testsuite/27_io/basic_fstream/4.cc: Likewise.
* testsuite/27_io/basic_ifstream/4.cc: Likewise.
* testsuite/27_io/basic_ios/4.cc: Likewise.
* testsuite/27_io/basic_iostream/4.cc: Likewise.
* testsuite/27_io/basic_istream/4.cc: Likewise.
* testsuite/27_io/basic_istingstream/4.cc: Likewise.
* testsuite/27_io/basic_ofstream/4.cc: Likewise.
* testsuite/27_io/basic_ostream/4.cc: Likewise.
* testsuite/27_io/basic_ostringstream/4.cc: Likewise.
* testsuite/27_io/basic_stringbuf/5.cc: Likewise.
* testsuite/27_io/basic_stringstream/4.cc: Likewise.
PR c++/13536
* parser.c (cp_parser): Add in_type_id_in_expr_p.
(cp_parser_new): Initialize it.
(cp_parser_postfix_expression): Set it.
(cp_parser_sizeof_operand): Likewise.
(cp_parser_parameteR_declaration): Do not commit early to tenative
parsers when in_type_id_in_expr_p is set.
PR c++/13536
* g++.dg/parse/cast1.C: New test.
From-SVN: r75397
Diffstat (limited to 'libstdc++-v3/testsuite/27_io/basic_ios')
-rw-r--r-- | libstdc++-v3/testsuite/27_io/basic_ios/4.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/4.cc b/libstdc++-v3/testsuite/27_io/basic_ios/4.cc index 517799e861b..7e70339d875 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/4.cc @@ -30,7 +30,7 @@ void test01() typedef std::ios_base base_type; std::stringbuf buf; - const test_type& obj = test_type(&buf); + const test_type& obj = *new test_type(&buf); const base_type* base __attribute__((unused)) = &obj; } |