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: Nathan Sidwell <nathan at codesourcery dot com>
- To: Daniel Franke <daniel dot franke at imbs dot uni-luebeck dot de>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 02 Jul 2003 13:40:02 +0100
- Subject: Re: cannot pass objects of non-POD type [] through '...'
- Organization: Codesourcery LLC
- References: <MMENKPEHNDJKPHJFBKFDKEACCCAA.daniel.franke@imbs.uni-luebeck.de>
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