From: | Larry Rosenman <ler(at)lerctr(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Ian Lance Taylor <ian(at)airs(dot)com>, 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 01:25:48 |
Message-ID: | 20010319192547.A29294@lerami.lerctr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> [010319 18:58]:
> 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 ...
My C99 compiler (SCO, UDK FS 7.1.1b), defines the following:
Predefined names
The following identifiers are predefined as object-like macros:
__LINE__
The current line number as a decimal constant.
__FILE__
A string literal representing the name of the file being compiled.
__DATE__
The date of compilation as a string literal in the form ``Mmm dd
yyyy.''
__TIME__
The time of compilation, as a string literal in the form
``hh:mm:ss.''
__STDC__
The constant 1 under compilation mode -Xc, otherwise 0.
__USLC__
A positive integer constant; its definition signifies a USL C
compilation system.
Nothing for function that I can find.
LER
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
From | Date | Subject | |
---|---|---|---|
Next Message | Neal Norwitz | 2001-03-20 01:44:11 | Re: elog with automatic file, line, and function |
Previous Message | Tom Lane | 2001-03-20 01:08:38 | Re: Stuck spins in current |