cannot pass objects of non-POD type [] through '...'
Daniel Franke
daniel.franke@imbs.uni-luebeck.de
Wed Jul 2 13:06:00 GMT 2003
> 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
More information about the Gcc-bugs
mailing list