public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35116]  New: [4.3 Regression]: Fail to compile valid code
@ 2008-02-07  3:48 hjl dot tools at gmail dot com
  2008-02-07  5:11 ` [Bug c++/35116] " hjl dot tools at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-02-07  3:48 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-02-15 11:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-07  3:48 [Bug c++/35116] New: [4.3 Regression]: Fail to compile valid code hjl dot tools at gmail dot com
2008-02-07  5:11 ` [Bug c++/35116] " hjl dot tools at gmail dot com
2008-02-07  7:20 ` jason at gcc dot gnu dot org
2008-02-07  7:44 ` manu at gcc dot gnu dot org
2008-02-07  8:55 ` jakub at gcc dot gnu dot org
2008-02-07 10:36 ` pinskia at gcc dot gnu dot org
2008-02-09  3:41 ` jason at gcc dot gnu dot org
2008-02-09  9:53 ` jakub at gcc dot gnu dot org
2008-02-14 14:55 ` pinskia at gcc dot gnu dot org
2008-02-15 11:41 ` reichelt at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).