[PATCH] PR19341, debug-info refers to nonexistent object

David Blaikie dblaikie at gmail.com
Fri Apr 18 10:43:51 PDT 2014


Thanks for the work/patch anyway, Paul.

It might be worth attaching it to the bug for posterity in case
someone decides this is really important for some use case (people do
invalid things from time to time & /sometimes/ it's deemed important
enough to tolerate)

On Fri, Apr 18, 2014 at 10:39 AM, Robinson, Paul
<Paul_Robinson at playstation.sony.com> wrote:
> Patch withdrawn. David Blaikie correctly points out that the
> address expression ODR-uses the thing pointed to, and the context
> does not fall into either exception to the rule.
> --paulr
>
>> -----Original Message-----
>> From: cfe-commits-bounces at cs.uiuc.edu [mailto:cfe-commits-
>> bounces at cs.uiuc.edu] On Behalf Of Robinson, Paul
>> Sent: Tuesday, April 15, 2014 4:09 PM
>> To: cfe-commits at cs.uiuc.edu
>> Subject: [PATCH] PR19341, debug-info refers to nonexistent object
>>
>> PR19341 shows that if a template parameter is a pointer to something
>> (variable, function, pointer-to-member) that is declared but not
>> defined, and also isn't used within the body of the template, then the
>> generated code will not emit any reference to the thing but the debug
>> info will create such a reference (trying to describe its location).
>> This patch doesn't describe the location unless the template parameter
>> is actually used within the template.
>>
>> The patch looks bigger than it really is because a chunk of code now
>> gets wrapped in an if statement, and just gets indented.
>>
>> For the test, I had to add uses of some existing template parameters
>> so the references would be created properly, then I added a another
>> template to show that without any uses there won't be a location.
>> Thanks,
>> --paulr
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list