C++ and gather-detailed-mem-stats

Florian Weimer fweimer@redhat.com
Wed Aug 15 10:11:00 GMT 2012


On 08/15/2012 12:07 PM, Gabriel Dos Reis wrote:

> You might try to encode/package information with the
> parameters T and A, but essentially you will hit the wall
> that __FILE__, __LINE__, and __FUNCTION__ are CPP artifacts.

GNAT has built-in functions which return this information.  When they 
are used in default argument expressions and these arguments are 
omitted, the functions are evaluated in the context of the caller and 
return the file position at that point.  Perhaps that would be an 
approach for C++ as well?

(This assumes that gather-detailed-mem-stats is not needed in the first 
stage compiler.)

-- 
Florian Weimer / Red Hat Product Security Team



More information about the Gcc mailing list