This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]