[patch] __TIMESTAMP__ predefined macro

Grigory Zagorodnev grigory_zagorodnev@linux.intel.com
Wed Feb 15 13:53:00 GMT 2006


Hi!

The patch implements __TIMESTAMP__ predefined macro in the form similar 
to MSVC and ICC compilers - date and time of the last modification of 
the current source file like "Thu Feb  9 18:07:36 2006". This macro 
seems to be widely used but not implemented in GCC yet.

Verified at x86_64-redhat-linux-gnu.

Ok for mainline?

- Grigory

2006-02-15  Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>

     * gcc/doc/cpp.texi: add description of __TIMESTAMP__ macro to the 
user's documentation
     * gcc/testsuite/gcc.dg/cpp/undef2.c: enlarge tests to cover new 
predefined macro
     * gcc/testsuite/gcc.dg/cpp/trad/builtins.c: same as above
     * libcpp/macro.c (_cpp_builtin_macro_text): generate text for 
__TIMESTAMP__ built-in macro
     * libcpp/files.c (_cpp_get_file_stat): new function - interface to 
file statistics record in _cpp_file structure.
     * libcpp/include/cpplib.h: new constant to process __TIMESTAMP__ 
macro definition
     * libcpp/init.c: new built in macro definition
     * libcpp/internal.h: new declaration of _cpp_get_file_stat; new 
field timestamp of cpp_buffer structure to hold generated string for 
future possible reuse
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: timestamp.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060215/5331d7b2/attachment.ksh>


More information about the Gcc-patches mailing list