This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: missing warning


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]