From 543df66a56c015c2e6c6ece35267f2e975b8a951 Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Fri, 4 Dec 1998 19:12:58 +0000 Subject: [PATCH] =?utf8?q?=EF=BF=BD=20nortel=20regressions=20since=2097r1?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit From-SVN: r24093 --- .../g++.old-deja/g++.benjamin/16077.C | 28 +++++++++++++++++++ .../g++.old-deja/g++.benjamin/18208.C | 25 +++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.benjamin/16077.C create mode 100644 gcc/testsuite/g++.old-deja/g++.benjamin/18208.C diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/16077.C b/gcc/testsuite/g++.old-deja/g++.benjamin/16077.C new file mode 100644 index 00000000000..f38154ec507 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/16077.C @@ -0,0 +1,28 @@ +// 981203 bkoz +// g++/16077 +// Build don't link: + +class nicaragua; +struct colombia { + colombia(); + colombia(const colombia &); + colombia(const nicaragua &); + colombia &operator= (const colombia&); +}; + +struct nicaragua { +public: + nicaragua(); + nicaragua(const nicaragua&); + operator colombia(); +}; + +void peace(const colombia&); // WARNING - // WARNING - + +void foo(nicaragua& b) { + peace(b); // WARNING - // WARNING - +} + + + + diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/18208.C b/gcc/testsuite/g++.old-deja/g++.benjamin/18208.C new file mode 100644 index 00000000000..7ec1dc09098 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/18208.C @@ -0,0 +1,25 @@ +// 981204 bkoz +// g++/18208 +// Build don't link: + +typedef unsigned int uint_32; + +class puertorico { +public: + void *f (); +private: + uint_32 member; +}; + +void foo( ) +{ + uint_32 ui; + puertorico obj; + + // Bug using static_cast<> + ui = static_cast(obj); // ERROR - // ERROR - + + // Bug when missing the pair of braces + ui = (uint_32) obj.f; // ERROR - // ERROR - +} + -- 2.30.2