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

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

Re: [avr-gcc-list] Code version timestamp


From: John Altstadt
Subject: Re: [avr-gcc-list] Code version timestamp
Date: Fri, 16 Sep 2005 09:19:55 -0700
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050723)

Vincent Trouilliez wrote:
Look at the __DATE__ and __TIME__ predefined macros. Since they are already string constants, you can use the compiler to concatenate them with the string you want to display, such as:

char *version =
"Compiled on " __DATE__ " at " __TIME__;


Would love to use these Macros, but whenever I try to use  __DATA__ for
example, the compiler complains that :

error: `__DATA__' undeclared (first use in this function)

Are these macros been introduced so recently in gcc that my sliiighlty
old 3.4.3 version doesn't support them ?

As far as I can remember, __DATE__ and __TIME__ were standard predefined cpp macros before a C standard existed.

You used __DATA__ when you should have used __DATE__. I also get blinders when looking at code sometime. :-)

John




reply via email to

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