Re: warning: cannot pass objects of non-POD type ‘class A’ through ‘...’; call will abort at runtim e

Manuel López-Ibáñez lopezibanez@gmail.com
Thu Apr 15 23:57:00 GMT 2010


On 15 April 2010 18:53, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
> On 15 April 2010 18:24, Martin Olsson <martin@minimum.se> wrote:
>>
>> 1. Why is this a "warning" rather than an "error"? When I run the program
>> it hits a "ud2a" instruction emitted by gcc and promptly hits SIGILL.
>
> See the discussion in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19291
>
> Basically, the C++ standard seems to say that this cannot be a hard-error.

Actually, in this case, GCC 4.5 does not warn and it doesn't abort.
For the PR testcase, we now give a hard error.

Cheers,

Manuel.



More information about the Gcc-help mailing list