This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: cannot pass objects of non-POD type [] through '...'
- From: "Daniel Franke" <daniel dot franke at imbs dot uni-luebeck dot de>
- To: <gcc-bugs at gcc dot gnu dot org>
- Date: Wed, 2 Jul 2003 15:10:52 +0200
- Subject: RE: cannot pass objects of non-POD type [] through '...'
> nope. [18.7/3]
> If the parmeter parmN [stream in this case] is declared with a function,
> array or reference type, or with a type that is not compatible with the
> type that results when passing an argument for which there is no
> parameter,
> the behaviour is undefined.
Nathan,
if I got you right, this happen's because I'm passing a reference to the
ostream object.
> ostream& func(ostream &stream, ...)
But, sorry, why in heavens sake this result's in undefined behaviour?
Is it really coincidence that it works like expected when gcc eventually
builds a binary? May it stall in, say 5 of 100, sucessive runs?
So, in short: I simply have to redesign my app to avoid this?
regards
Daniel