This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: C++ PATCH for c++/44193 (incorrect handling of functions, cv-quals and typename)


On Wed, May 19, 2010 at 1:57 PM, Jason Merrill <jason@redhat.com> wrote:
> On 05/19/2010 11:43 AM, Jason Merrill wrote:
>>
>> In the code for handling TEMPLATE_TYPE_PARM we properly drop cv-quals
>> when substituting in a function type, but we fail to do the same for
>> TYPENAME_TYPE. Fixed on the release branches by copying over the code
>> from the type parm case. For 4.6 I have a more involved patch in the
>> works.
>
> As promised: For 4.6 I'm changing cp_build_qualified_type and cp_type_quals
> to ignore the quals on FUNCTION_TYPE in favor of using new functions
> type_memfn_quals and apply_memfn_quals, since function-cv-qualifiers are
> completely distinct from normal type qualifiers. ?This should help to avoid
> any other similar situations in the future.
>
> While I was looking at these bits, I also tweaked some related things:
>
> merge-fn-quals.patch -- we were droping function-cv-qualifiers in
> merge_types.
>
> dr295.patch -- our handling of applying cv quals to functions was scattered
> around the compiler and not consistent. ?I think we should just apply the DR
> 295 resolution in all cases; limiting it to C++0x mode doesn't make any
> sense, since it was part of CD1.
>
> cp_type_quals.patch -- Change almost all users of build_qualified_type and
> TYPE_QUALS to use cp_build_qualified_type and cp_type_quals consistently.
>
> Tested x86_64-pc-linux-gnu, applied to trunk.
>

This patch caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44540


-- 
H.J.


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