This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa] handle integer downsizing correctly in C++ overloading


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]