[C++ PATCH] Stop confusing warning, remove DR295

Nathan Sidwell nathan@codesourcery.com
Fri Sep 13 09:26:00 GMT 2002


Hi,
the attached patch removes the implementation of DR295, because that changes
the meaning of existing code. Specifically something like
	template<typename T> void foo (T); //#1
	template<typename T> void foo (T volatile); //#2
for T being 'int ()()' #2 is now chosen, because it is more specialized
than #1 (previously, it would not be deduceable).
Also, I have disabled the warnings about ignoring volatile on a reference,
because we'd get confusing, and incorrect warnings from the attached test case.

I used #if 0 to disable the tests, because that's one of the few (only?)
places where tf_warning is tested for anything. We need better diagnostic
control really.

ok for mainline? booted & tested on i686-pc-linux-gnu.

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
          'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: deduce1.C
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20020913/4e971a01/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tplcvqual2.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20020913/4e971a01/attachment-0001.ksh>


More information about the Gcc-patches mailing list