From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23972 invoked by alias); 5 Mar 2003 23:06:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 23886 invoked by uid 71); 5 Mar 2003 23:06:00 -0000 Date: Wed, 05 Mar 2003 23:06:00 -0000 Message-ID: <20030305230600.23830.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: RE: c++/9942: Function Overload Resolution calls wrong function o n variable length parameter lists Reply-To: Wolfgang Bangerth X-SW-Source: 2003-03/txt/msg00236.txt.bz2 List-Id: The following reply was made to PR c++/9942; it has been noted by GNATS. From: Wolfgang Bangerth To: Steve Wadsworth Cc: "'gcc-bugs@gcc.gnu.org'" , "'gcc-gnats@gcc.gnu.org'" Subject: RE: c++/9942: Function Overload Resolution calls wrong function o n variable length parameter lists Date: Wed, 5 Mar 2003 17:03:00 -0600 (CST) > Attached is sample code to exhibit this. OK, here's a reduced example: ------------------------ #include void f(int, va_list&) ; // only declared void f(int, ...) {}; // defined int main () { char *p; f(1, p); // should probably call second f() } ------------------------ This compiles and links fine with 2.95, but not with 3.2.1. Will have to check on that other system what happens with 3.3 and mainline. W. Here's the result: tmp/g> ~/bin/gcc-3.2.1/bin/c++ x.cc /tmp/ccOD0xO1.o: In function `main': /tmp/ccOD0xO1.o(.text+0x25): undefined reference to `f(int, char*&)' collect2: ld returned 1 exit status ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth/