This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: missing warning
- To: lav at long dot yar dot ru
- Subject: Re: missing warning
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Sun, 22 Nov 1998 22:37:20 +0100
- CC: egcs-bugs at cygnus dot com
- References: <19981122164732.A2979@long.yar.ru>
> In the following C++ program the ~B destructor is not called (egcs-1.1). I
> know why, but none the less I beleave a warning is required.
>From the language lawyer's view, a diagnosis *must* be issued if the
program is ill-formed, and g++ still choses to accept it as an
extension. If a program includes undefined, unspecified, or
implementation-defined behaviour, a diagnosis *may* be issued.
You program is well-formed and has well-defined behaviour: the
destructor must not be called. Therefore, the program must be accepted
without diagnosis.
Of course, g++ *could* issue a warning. If you provide patches that
do so and don't break anything else, they may get accepted.
Regards,
Martin