This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] __TIMESTAMP__ predefined macro
On Wed, Feb 15, 2006 at 07:48:43AM -0800, H. J. Lu wrote:
> On Wed, Feb 15, 2006 at 06:26:58PM +0300, Grigory Zagorodnev wrote:
> >
> > >Also why don't you just use ctime or asctime instead of spelling it out?
> > This is correct. Describing __DATE__ and __TIME__ predefined macro in
> > section 6.10.8, the C99 Standard refers asctime. Thus using
> > asctime(localtime()) seems to be suitable solution. However the original
> > idea was to follow existing cpplib approach for __DATE__ and __TIME__
> > string generation.
> >
>
> asctime is locale dependent. Grigory's approach is locale independent,
> like __DATE__ and __TIME__.
What definition of asctime are you looking at? Not POSIX's, not C99's.
--
Daniel Jacobowitz
CodeSourcery