Re: elog with automatic file, line, and function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ian Lance Taylor <ian(at)airs(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: elog with automatic file, line, and function
Date: 2001-03-20 00:38:36
Message-ID: 8353.985048716@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ian Lance Taylor <ian(at)airs(dot)com> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> BTW, how does that work exactly? I assume it can't be a macro ...

> It's a macro just like __FILE__ and __LINE__ are macros.

> gcc has supported __FUNCTION__ and __PRETTY_FUNCTION__ for a long time
> (the latter is the demangled version of the function name when using
> C++).

Now that I know the name, I can find it in the gcc docs, which clearly
explain that these names are not macros ;-). The preprocessor would
have a tough time making such a substitution.

However, if the C99 spec has such a concept, they didn't use that name
for it ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mikheev, Vadim 2001-03-20 00:59:57 RE: Stuck spins in current
Previous Message Tom Lane 2001-03-20 00:35:22 Re: More on elog and error codes