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

Robinson, Paul Paul_Robinson at playstation.sony.com
Fri Apr 18 10:39:32 PDT 2014


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






More information about the cfe-commits mailing list