From be8ac3e243dda9430ee53a245a3c1ee3a6acbc7c Mon Sep 17 00:00:00 2001 From: Grigory Zagorodnev Date: Sat, 18 Feb 2006 09:25:31 +0000 Subject: cpp.texi (__TIMESTAMP__): Document. 2006-02-17 Grigory Zagorodnev gcc/ChangeLog: * doc/cpp.texi (__TIMESTAMP__): Document. libcpp/ChangeLog: * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP. * files.c (_cpp_get_file_stat): New function. * include/cpplib.h (builtin_type): Add BT_TIMESTAMP. * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP. * internal.h (_cpp_get_file_stat): Prototype. (struct cpp_buffer): Add timestamp. gcc/testsuite/ChangeLog: * gcc.dg/cpp/undef3.c: New test. * gcc.dg/cpp/trad/builtins2.c: New test. From-SVN: r111232 --- gcc/doc/cpp.texi | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gcc/doc') diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi index c019adb..e693942 100644 --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi @@ -2128,6 +2128,17 @@ use. This macro is defined, with value 2, when @option{-fstack-protector-all} is in use. +@item __TIMESTAMP__ +This macro expands to a string constant that describes the date and time +of the last modification of the current source file. The string constant +contains abbreviated day of the week, month, day of the month, time in +hh:mm:ss form, year and looks like @code{@w{"Sun Sep 16 01:03:52 1973"}}. +If the day of the month is less than 10, it is padded with a space on the left. + +If GCC cannot determine the current date, it will emit a warning message +(once per compilation) and @code{__TIMESTAMP__} will expand to +@code{@w{"??? ??? ?? ??:??:?? ????"}}. + @end table @node System-specific Predefined Macros -- cgit v1.1