C++ PATCH: fix PC 10903
Andrew Pinski
pinskia@physics.uc.edu
Wed Jul 16 01:57:00 GMT 2003
On Tuesday, Jul 15, 2003, at 21:53 US/Eastern, Phil Edwards wrote:
> On Wed, Jul 16, 2003 at 03:42:52AM +0200, Gabriel Dos Reis wrote:
>> *** cp/ChangeLog 16 Jul 2003 01:41:40 -0000
>> --- cp/ChangeLog 16 Jul 2003 00:09:41 -0000 1.3526
>> ***************
>> *** 1,9 ****
>> - 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
>> -
>> - PR c++/10903
>> - * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
>> - Improve.
>> -
>
> Both the changelog entry and the testcase show up as removals rather
> than additions. Could you check that please, just to be safe?
The patch was reversed for some reason so you are reading the patch the
opposite way.
>> *************** convert_nontype_argument (tree type, tre
>> *** 3085,3098 ****
>> }
>> else
>> {
>> ! if (TYPE_P (expr))
>> ! error ("type '%T' cannot be used as a value for a non-type "
>> ! "template-parameter", expr);
>> ! else if (DECL_P (expr))
>> ! error ("invalid use of '%D' as a non-type
>> template-argument", expr);
>> ! else
>> ! error ("invalid use of '%E' as a non-type
>> template-argument", expr);
>> !
>> return NULL_TREE;
>> }
>>
>> --- 3085,3091 ----
>> }
>> else
>> {
>> ! error ("object `%E' cannot be used as template argument",
>> expr);
>> return NULL_TREE;
>> }
>
> People might get confused about the use of "object" here. What do you
> think of something like
>
> error ("`%E' cannot be used as a non-type template argument",
> expr);
Again the patch is reversed so that error message is now gone.
Thanks,
Andrew Pinski
More information about the Gcc-patches
mailing list