From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17300 invoked by alias); 11 Nov 2003 16:45:17 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 17293 invoked from network); 11 Nov 2003 16:45:16 -0000 Received: from unknown (HELO fed1mtao05.cox.net) (68.6.19.126) by sources.redhat.com with SMTP; 11 Nov 2003 16:45:16 -0000 Received: from kiuney.jonvance.com ([68.3.89.2]) by fed1mtao05.cox.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20031111164506.UNQZ9968.fed1mtao05.cox.net@kiuney.jonvance.com> for ; Tue, 11 Nov 2003 11:45:06 -0500 Message-Id: <5.2.0.9.0.20031111094415.0286cdb8@fairsing.com> X-Sender: jon@fairsing.com Date: Tue, 11 Nov 2003 16:45:00 -0000 To: gcc-help@gcc.gnu.org From: Jon Vance Subject: could not convert `obj(5)' to `obj &' Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-SW-Source: 2003-11/txt/msg00149.txt.bz2 I have a bunch of code that used to compile under an older version of gcc, and will not do so using 2.96. Here is a very simple example of the problem I am having: CODE: #include struct obj { int i; obj(int n) : i(n) {} }; void printit(obj& o) { printf("%d\n", o.i); } main() { printit(obj(5)); } COMPILER ERROR: g++ t.cpp -o t t.cpp: In function `int main ()': t.cpp:17: could not convert `obj(5)' to `obj &' t.cpp:11: in passing argument 1 of `printit (obj &)' make: *** [t] Error 1 Any ideas?