[Bug c++/14369] New: errenous reject of well-formed code
gdr at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Mar 1 18:36:00 GMT 2004
Current mainline rejects the following (I think GCC-3.4.x is affected as
well but I did not check).
struct A { };
template<class T>
struct X : A {
const A* bar() const
{ return this; }
const A& foo() const;
};
template<class T>
const A& X<T>::foo() const
{
const A* t = bar();
return *(t ? t : throw 0);
}
with the rather esoteric:
t.C: In member function `const A& X<T>::foo() const':
t.C:15: error: `#`throw_expr' not supported by dump_expr#<expression error>' has
type `void' and is not a throw-expression
The pretty-printing error is easily fixed, but that is not the main
point of the PR. This is reject valid and a regression from at least
GCC-3.3.x
--
Summary: errenous reject of well-formed code
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gdr at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14369
More information about the Gcc-bugs
mailing list