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: [PATCH] Propagate source locations from function_decls to their template_decls


Thanks. Committed to gcc-4_6-branch in r176851 and the google/gcc-4_6
branch in r177072.

On Wed, Jul 27, 2011 at 11:46 AM, Jason Merrill <jason@redhat.com> wrote:
> Yes.
>
> Jeffrey Yasskin <jyasskin@google.com> wrote:
>
> Thanks. I'll commit to trunk in the morning when I can be around to
> watch for breakage.
>
> Is this also ok for gcc-4_6-branch?
>
> On Tue, Jul 26, 2011 at 7:16 PM, Jason Merrill <jason@redhat.com> wrote:
>> Ok.
>>
>> Jeffrey Yasskin <jyasskin@google.com> wrote:
>>
>> Hi Jason. Paolo suggested I ping you directly about this patch for the
>> C++ parser. Thanks in advance for taking a look.
>>
>> On Tue, Jul 26, 2011 at 2:20 PM, Jeffrey Yasskin <jyasskin@google.com> wrote:
>>> This patch copies the source location of a FUNCTION_DECL to the
>>> TEMPLATE_DECL that build_template_decl() builds out of it. Otherwise,
>>> the TEMPLATE_DECL's location becomes input_location, which is the end
>>> of the parameter list, while the FUNCTION_DECL's location is the
>>> location of the name of the function. Depending on what order
>>> templates are defined and used, gcc may emit either the
>>> FUNCTION_DECL's or TEMPLATE_DECL's location into the debug location,
>>> which causes gold's ODR checker to emit false positives.
>>>
>>> Tested with a bootstrap+`make -k check-c++` on
>>> x86_64-unknown-linux-gnu. I'm looking to check it in to trunk, and
>>> will propagate it to the gcc-4_6-branch if you think that's the right
>>> thing to do.
>>>
>>> No more tests fail than in
>>> http://gcc.gnu.org/ml/gcc-testresults/2011-07/msg02995.html.
>>>
>>> gcc/cp/ChangeLog:
>>> 2011-07-26 ? Jeffrey Yasskin ?<jyasskin@google.com>
>>>
>>> ? ? ? ?* pt.c (build_template_decl): Copy the function_decl's source
>>> ? ? ? ?location to the new template_decl.
>>>
>>> gcc/testsuite/ChangeLog:
>>> 2011-07-26 ? Jeffrey Yasskin ?<jyasskin@google.com>
>>>
>>> ? ? ? ?* g++.old-deja/g++.pt/crash60.C: Updated.
>>>
>>> libstdc++-v3/ChangeLog:
>>> 2011-07-26 ? Jeffrey Yasskin ?<jyasskin@google.com>
>>>
>>> ? ? ? ?* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Updated.
>>>
>>
>


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