[Bug c++/12567] New: g++ fails to recognize ill-formed-ness of initilaizers

debian-gcc at lists dot debian dot org gcc-bugzilla@gcc.gnu.org
Fri Oct 10 08:55:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12567

           Summary: g++ fails to recognize ill-formed-ness of initilaizers
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                CC: gcc-bugs at gcc dot gnu dot org

[forwarded from http://bugs.debian.org/195468]

g++ fails to recognize the ill-formed-ness of at least the following cases,
happily succeeds compiling them...:

struct foo {
  virtual void f(void);
};

struct bar {
  bar (); // user defined default constructor
};

struct doo {
  bar m_bar; // non-POD member w/ u.d.d.c
};

struct zoo: public bar { }; // inherited u.d.d.c

const foo a_foo; // ill-formed - foo has no user-declared def-cons
const bar a_bar; // ok
const doo a_doo; // ill-formed - doo has no user-declared def-cons
const zoo a_zoo; // ill-formed? not sure about this one...



More information about the Gcc-bugs mailing list