avr-gcc-list
[Top][All Lists]
Advanced

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

RE: [avr-gcc-list] __DATE__ constant, any way to format it differently ?


From: Weddington, Eric
Subject: RE: [avr-gcc-list] __DATE__ constant, any way to format it differently ?
Date: Wed, 28 Jan 2009 13:06:47 -0700

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Vincent Trouilliez
> Sent: Wednesday, January 28, 2009 12:57 PM
> To: address@hidden
> Subject: [avr-gcc-list] __DATE__ constant, any way to format 
> it differently ?
> 
> Hello,
> 
> I am using the __DATE__ constant, to display it on screen at power-up.
> the screen is a 4x20 LCD, and the string returned by __DATE__ is quite
> long: "MMM DD YYYY".
> 
> Is there a way to select a different (shorter in my case) 
> format, or is
> it cast in stone ?
> 
> I downloaded the heavy GCC 4.3.3 PDF manual, and among 636 pages, the
> only occurence of __DATE__ is in this sentence:
> 
> "The definitions for __DATE__ and __TIME__ when respectively, the date
> and time of translation are not available (C90 6.8.8, C99 6.10.8)."
> 
> "not available" ?
> 
> I thought maybe it's supplied by avr-libc then, but the 
> manual for that
> doesn't has any, zero, mention of __DATE__
> 
> So it must be a gift from the AVR port of GCC then, but where is it
> documented ? 

The __DATE__ macro is a predefined macro, and you can find it in the C 
Preprocessor manual (CPP) which is separate from the GCC manual. Look under 
section 3.7.1, "Standard Predefined Macros".

 
> 
> While I am at it, in the same vein, has anybody a trick to retrieve
> the program revision number from subversion, so I can display that too
> along with the compilation date ?

Which program are you talking about? You just want the latest revision number 
from Subversion (no matter what repository)?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]