From: David Carlton <carlton@math.stanford.edu>
To: gdb-patches@sources.redhat.com
Cc: Daniel Jacobowitz <drow@mvista.com>
Subject: Re: [rfa] handle integer downsizing correctly in C++ overloading
Date: Fri, 31 Jan 2003 20:04:00 -0000 [thread overview]
Message-ID: <ro165s5gk6x.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <ro1fzr9gkie.fsf@jackfruit.Stanford.EDU>
On 31 Jan 2003 11:57:29 -0800, David Carlton <carlton@math.Stanford.EDU> 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 <carlton@math.stanford.edu>
* 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;
next prev parent reply other threads:[~2003-01-31 20:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-31 19:57 David Carlton
2003-01-31 20:04 ` David Carlton [this message]
2003-02-04 19:10 ` Daniel Jacobowitz
2003-02-04 21:23 ` David Carlton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ro165s5gk6x.fsf@jackfruit.Stanford.EDU \
--to=carlton@math.stanford.edu \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox