public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12507] New: Possible regression in 3.4 or bug in 3.3.1
@ 2003-10-04 13:22 merkert at charter dot net
  2003-10-04 21:05 ` [Bug c++/12507] [3.3 Regression] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 9+ messages in thread
From: merkert at charter dot net @ 2003-10-04 13:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           Summary: Possible regression in 3.4 or bug in 3.3.1
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: merkert at charter dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: g++ (GCC) 3.4 20031001 (experimental)

This code here will compiles with 3.3.1, but fails to compile with 3.4. It's
possible that the code is actually incorrect and 3.3.1 should not compile it, so
I don't know if it's a regression. I'd say 3.3.1 gets it wrong.

cat > test.cpp <<EOF
#include <cstdio>

template <class T> struct A {

  template <class U> A (const U& u)
  {
    _a = dynamic_cast<const T&>(u);
    ::std::printf("1\n");
  }

  T _a;
};

struct  B {
  virtual ~B() {}
};
struct C : public virtual B
{
  ~C() {}
};

typedef A<C> Ac;

int main()
{
  C c;
  B& b = c;
  Ac<B> a(b); // only compiles with 3.3.1
// Ac::A<B> a(b)   compils with both, 3.4 and 3.3.1
  return 0;
}
EOF


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

end of thread, other threads:[~2003-12-22  5:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20031004132236.12507.rmerkert@alphatech.com>
2003-10-11  3:40 ` [Bug c++/12507] [3.3 Regression] Possible regression in 3.4 or bug in 3.3.1 pinskia at gcc dot gnu dot org
2003-10-16  9:37 ` mmitchel at gcc dot gnu dot org
2003-10-24 15:49 ` [Bug c++/12507] [3.3 Regression] use of template arg for fully specialized typedef allowed bangerth at dealii dot org
2003-10-24 15:54 ` bangerth at dealii dot org
2003-12-21 22:04 ` pinskia at gcc dot gnu dot org
2003-12-22  5:55 ` mmitchel at gcc dot gnu dot org
2003-12-22  6:14 ` gdr at gcc dot gnu dot org
2003-12-22  6:15 ` gdr at integrable-solutions dot net
2003-10-04 13:22 [Bug c++/12507] New: Possible regression in 3.4 or bug in 3.3.1 merkert at charter dot net
2003-10-04 21:05 ` [Bug c++/12507] [3.3 Regression] " pinskia 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).