cannot pass objects of non-POD type [] through '...'

Nathan Sidwell nathan@codesourcery.com
Wed Jul 2 12:40:00 GMT 2003


Daniel Franke wrote:
> Hi,
> 
> here are short sample program and some compiler outputs ...
> 
> Maybe someone can explain this behaviour, since I believe THIS should really
> be possible?!
> 
> regards
> 	Daniel
> 
> 
> ------------------------------------
> 
> #include <iostream>
> #include <cstdarg>
> 
> using namespace std;
> 
> ostream& func(ostream& stream, ...) {
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

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
          The voices in my head said this was stupid too
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk




More information about the Gcc-bugs mailing list