Re: [PATCH] __DATE__ & __TIME expansion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Neil Booth wrote:
> Damien Lespiau wrote:-
> 
>> Makes __DATE__expand to a character string literal of
>> the form "Mmm dd yyyy" where the names of the months
>> are the same as those generated by the asctime function,
>> and the first character of dd is a space character if the
>> value is less than 10.
>> Makes __TIME__ expand to a a character string literal of
>> the form "hh:mm:ss" as in the time generated by the
>> asctime function.
>>
>> So says C99.
>>
>> Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx>
> 
> It seems your code could lead to these macros having different
> values in a long compilation, which the standard doesn't permit.

Ah, I didn't know that.  So calling time more than once doesn't just slow down
compilation; it also violates the standard.  I feel better about asking for a
fix to only call time once, now. :)

- Josh Triplett


Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux