This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/35116] New: [4.3 Regression]: Fail to compile valid code
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Feb 2008 03:47:23 -0000
- Subject: [Bug c++/35116] New: [4.3 Regression]: Fail to compile valid code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Gcc 4.3 revision 132153 failed to compile:
[hjl@gnu-23 build_base_o2.0000]$ cat x.cc
#include <vector>
template <typename Number>
class Vector
{
};
template <int dim>
class Foo
{
public:
virtual void foo (const unsigned int);
struct Data
{
std::vector<Vector<double> > bar;
};
};
template <int dim>
void Foo<dim>::foo (const unsigned int n)
{
std::vector<Data> data(n);
}
template class Foo<3>;
[hjl@gnu-23 build_base_o2.0000]$ /usr/gcc-4.3/bin/gcc -O2 x.cc -S
x.cc: In member function âvoid Foo<dim>::foo(unsigned int) [with int dim = 3]â:
x.cc:22: instantiated from here
x.cc:20: error: void value not ignored as it ought to be
[hjl@gnu-23 build_base_o2.0000]$
Revision 131899 is OK.
--
Summary: [4.3 Regression]: Fail to compile valid code
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35116