From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1027 invoked by alias); 31 Jan 2003 20:04:24 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 1010 invoked from network); 31 Jan 2003 20:04:23 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by 172.16.49.205 with SMTP; 31 Jan 2003 20:04:23 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id h0VK4MJ28487; Fri, 31 Jan 2003 12:04:22 -0800 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: gdb-patches@sources.redhat.com Cc: Daniel Jacobowitz Subject: Re: [rfa] handle integer downsizing correctly in C++ overloading References: From: David Carlton Date: Fri, 31 Jan 2003 20:04:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-01/txt/msg00844.txt.bz2 On 31 Jan 2003 11:57:29 -0800, David Carlton said: > And there's a testsuite patch included to catch this as well. Whoops, I forgot to include the testsuite patch; here it is, if anybody's curious. David Carlton carlton@math.stanford.edu 2003-01-31 David Carlton * gdb.c++/overload.exp: Test intToChar(1). * gdb.c++/overload.cc (intToChar): New. (main): Call intToChar. Index: overload.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/overload.exp,v retrieving revision 1.9 diff -u -p -r1.9 overload.exp --- overload.exp 13 Jan 2003 20:09:33 -0000 1.9 +++ overload.exp 31 Jan 2003 19:20:38 -0000 @@ -378,3 +378,5 @@ gdb_test "list foo::overloadfnarg(int, i gdb_test "list \"foo::overloadfnarg(int, int (*)(int))\"" \ "int foo::overloadfnarg.*\\(int arg, int \\(\\*foo\\) \\(int\\)\\).*" \ "list overloaded function with function ptr args - quotes around argument" + +gdb_test "print intToChar(1)" ".\[0-9\]* = 297" Index: overload.cc =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/overload.cc,v retrieving revision 1.1.1.3 diff -u -p -r1.1.1.3 overload.cc --- overload.cc 22 Sep 1999 03:26:23 -0000 1.1.1.3 +++ overload.cc 31 Jan 2003 19:24:11 -0000 @@ -45,6 +45,11 @@ int overloadargs (int a1, int a2, int a3 }; +int intToChar (char c) +{ + return 297; +} + void marker1() {} @@ -72,6 +77,8 @@ int main () breakpoint(); #endif + // Verify that intToChar should work: + intToChar(1); marker1(); return 0;