I get this warning from GCC:
warning: cannot pass objects of non-POD type \'class Something\' through \'...\'; call will abort at runtime
You can use the -Werror compiler flag to turn all or some warnings into errors.
-Werror