This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] handle integer downsizing correctly in C++ overloading
- From: David Carlton <carlton at math dot stanford dot edu>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: 04 Feb 2003 13:23:38 -0800
- Subject: Re: [rfa] handle integer downsizing correctly in C++ overloading
- References: <ro1fzr9gkie.fsf@jackfruit.Stanford.EDU><20030204183222.GB22089@nevyn.them.org>
On Tue, 4 Feb 2003 13:32:22 -0500, Daniel Jacobowitz <drow@mvista.com> said:
> I (still) don't have a copy of the standard; I think I'll see about
> getting one this week. However, your explanation makes sense, and
> matches my reading of the conversion code that GCC uses for overload
> resolution (gcc/cp/call.c:build_conv and standard_conversion). This
> patch is OK.
Thanks, committed. To be honest, I would be shocked if we were
getting conversion completely correct even after this patch (even
setting aside scope issues arising from namespaces, subclasses, using
declarations, and the like), but it's an improvement. I've read the
relevant section of the standard only enough to know that:
* Narrowing integer conversions are definitely acceptable, albeit not
optimal.
* Anybody who can figure out how overloading and namespaces should
interact based on what the standard says is a _lot_ better at
reading standards than I am.
In cases like this, I've started adding code to the .cc files in the
testsuite to verify that the compiler and I agree with what the
standard says, because I don't always trust my understanding of these
issues.
David Carlton
carlton@math.stanford.edu