This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Section 12.1.13A of the Standard & gcc
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Section 12.1.13A of the Standard & gcc
- From: Michael Vance <briareos at lokigames dot com>
- Date: Thu, 15 Jun 2000 14:42:42 -0700
Gcc does not appear to think that A() can promote to type of A&
If this is answered somewhere else, please let me know. I've read the
spec, section 12.1.13A, and the answer is not clear to me. MSVC and
Metrowerks both allow this, but it seems up in the air to me. My
Windows counterparts are dubious of gcc's correct-ness :).
class A
{
public:
A( ) { };
};
void foo( A& a )
{
}
int main( int argc, char* argv[] )
{
foo( A( ) ); // doesn't work
return 0;
}
If foo() is changed to void foo( A a ), the call by value works just
fine.
Any information is appreciated, as well as a private Cc:.
m.
--
Programmer "Ha ha." "Ha ha." "What are you laughing at?"
Loki Software "Just the horror of being alive."
http://lokigames.com/~briareos/ - Tony Millionaire