🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1004

Re: Gnu C bug in '...' wild arg specification

#1004
From: David Kastrup
Date: Thu, 01 Oct 1992 22:12
19 lines
1516 bytes
A.APPLEYARD@fs1.mt.umist.ac.UK writes:


>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 '...'?

This was a warning. When passing objects through ..., as ARM explains,
data is copied RAW, that is, not constructed in any way. It would
not do to pass it initialized, because the called function would
not destruct it, or could use methods on it or whatever. So ... is
a cludge passing representations. You can do it, but the results are
far from well-defined. In the case of Complex, it might even work.
Technical Details
Message-ID: <dak.717977529@tabaqui>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tabaqui.informatik.rwth-aachen.de!dak
References: <MAILQUEUE-101.920930120855.851@fs1.metallurgy.umist.ac.uk>

Show 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!tabaqui.informatik.rwth-aachen.de!dak
From: dak@tabaqui.informatik.rwth-aachen.de (David Kastrup)
Subject: Re: Gnu C bug in '...' wild arg specification
Message-ID: <dak.717977529@tabaqui>
Sender: gnulists@ai.mit.edu
Organization: Rechnerbetrieb Informatik  /  RWTH Aachen
References: <MAILQUEUE-101.920930120855.851@fs1.metallurgy.umist.ac.uk>
Distribution: gnu
Date: Thu, 1 Oct 1992 22:12:09 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 20