Article View: gnu.g++.bug
Article #997Gnu C bug in '...' wild arg specification
From: A.APPLEYARD
Date: Wed, 30 Sep 1992 12:08
Date: Wed, 30 Sep 1992 12:08
17 lines
1186 bytes
1186 bytes
typedef struct{double re,im;} complex;
class Complex{public:double re,im;
inline void operator=(Complex&X){re=X.re; im=X.im;};};
void zxcvbnm(int n,...){n=1;}
main(){complex c; Complex C;
zxcvbnm(1,c);
zxcvbnm(1,C);}
After an unexpected compiler error remark in compiling a program, I compiled
this test program with a recent version of Gnu C++, and I got this error:-
t$$.cc: In function `int main()':
t$$.cc:7: warning: cannot pass objects of type `Complex' through `...'
Why does '...' accept structs but not classes? I have found nothing in (two
good Gnu C++ manuals that I have) about restrictions about what can be passed
through '...'. What other restrictions are there about '...'?
Technical Details
Message-ID:
<MAILQUEUE-101.920930120855.851@fs1.metallurgy.umist.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!fs1.mt.umist.ac.UK!A.APPLEYARDShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!fs1.mt.umist.ac.UK!A.APPLEYARD From: A.APPLEYARD@fs1.mt.umist.ac.UK Subject: Gnu C bug in '...' wild arg specification Message-ID: <MAILQUEUE-101.920930120855.851@fs1.metallurgy.umist.ac.uk> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Wed, 30 Sep 1992 12:08:55 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 18