This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cannot pass objects of non-POD type
On 10/24/07, Jack Lloyd <lloyd@randombit.net> wrote:
> Is there a reason it's not just an error, then? (As a user) I don't
> see the point of something being a warning when the compiled code is
> intentionally set up to crash.
Because the C++ standard (and the C standard) has mentioned that you
cannot diagnostic an undefined runtime behavior. So the code is valid
semantically but undefined at runtime.
Thanks,
Andrew Pinski