missing warning
Martin von Loewis
martin@mira.isdn.cs.tu-berlin.de
Sun Nov 22 13:59:00 GMT 1998
> 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
More information about the Gcc-bugs
mailing list