aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGrigory Zagorodnev <grigory_zagorodnev@linux.intel.com>2006-02-18 09:25:31 +0000
committerMarcin Dalecki <dalecki@gcc.gnu.org>2006-02-18 10:25:31 +0100
commitbe8ac3e243dda9430ee53a245a3c1ee3a6acbc7c (patch)
tree7042da2d52f0b0578ba88e4df4ca0cbceeee00ab /gcc
parent8d08b2d786e93fffe4c6802239b6808680785bc9 (diff)
downloadgcc-be8ac3e243dda9430ee53a245a3c1ee3a6acbc7c.zip
gcc-be8ac3e243dda9430ee53a245a3c1ee3a6acbc7c.tar.gz
gcc-be8ac3e243dda9430ee53a245a3c1ee3a6acbc7c.tar.bz2
cpp.texi (__TIMESTAMP__): Document.
2006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com> 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/doc/cpp.texi11
-rw-r--r--gcc/testsuite/ChangeLog5
3 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9acf0ac..0025c6c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
+
+ * doc/cpp.texi (__TIMESTAMP__): Document.
+
2006-02-17 Roger Sayle <roger@eyesopen.com>
PR middle-end/25600
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
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b8ea9f0..08b1d2d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
+
+ * gcc.dg/cpp/undef3.c: New test.
+ * gcc.dg/cpp/trad/builtins2.c: New test.
+
2006-02-18 Mark Mitchell <mark@codesourcery.com>
PR c++/26266