c++/1703: g++ creates default destructor with wrong `throw' signature
wolfgang.bangerth@iwr.uni-heidelberg.de
wolfgang.bangerth@iwr.uni-heidelberg.de
Fri Jan 19 10:36:00 GMT 2001
>Number: 1703
>Category: c++
>Synopsis: g++ creates default destructor with wrong `throw' signature
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Fri Jan 19 10:36:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Wolfgang Bangerth
>Release: unknown-1.0
>Organization:
>Environment:
CVS of 2001/01/19
>Description:
For the following, gcc errors out:
deal.II/base> cat tt.cc
struct X { ~X(); };
struct base { virtual ~base() throw(); };
struct d2 : public base { X x; };
deal.II/base> c++ -c tt.cc -o /dev/null
tt.cc:3: looser throw specifier for `virtual d2::~d2()'
tt.cc:2: overriding `virtual base::~base() throw ()'
I would argue that gcc should create a default destructor for
class d2 with no-throw signature, just as for the base class,
since otherwise one would be forced to write empty destructors
all over the place just to get the throw signature right.
Best regards
Wolfgang
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list