gcc/libcpp
Nathan Sidwell 4b5f564a5d libcpp: Provide date routine
Joseph pointed me at cb_get_source_date_epoch, which allows repeatable
builds and solves a FIXME I had on the modules branch.  Unfortunately
it's used exclusively to generate __DATE__ and __TIME__ values, which
fallback to using a time(2) call.  It'd be nicer if the preprocessor
made whatever time value it determined available to the rest of the
compiler.  So this patch adds a new cpp_get_date function, which
abstracts the call to the get_source_date_epoch hook, or uses time
directly.  The value is cached.  Thus the timestamp I end up putting
on CMI files matches __DATE__ and __TIME__ expansions.  That seems
worthwhile.

	libcpp/
	* include/cpplib.h (enum class CPP_time_kind): New.
	(cpp_get_date): Declare.
	* internal.h (struct cpp_reader): Replace source_date_epoch with
	time_stamp and time_stamp_kind.
	* init.c (cpp_create_reader): Initialize them.
	* macro.c (_cpp_builtin_macro_text): Use cpp_get_date.
	(cpp_get_date): Broken out from _cpp_builtin_macro_text and
	genericized.
2020-11-06 08:59:20 -08:00
..
include libcpp: Provide date routine 2020-11-06 08:59:20 -08:00
po Daily bump. 2020-07-21 00:16:28 +00:00
ChangeLog Daily bump. 2020-11-04 00:16:41 +00:00
ChangeLog.jit
Makefile.in libcpp, libdecnumber: configure and substitute AR 2020-05-23 21:59:02 +00:00
aclocal.m4 libcpp: Enable Intel CET on Intel CET enabled host for jit 2020-05-12 09:17:45 -07:00
charset.c diagnostics: Support conversion of tabs to spaces [PR49973] [PR86904] 2020-07-14 12:05:56 -04:00
config.in Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
configure Require CET support only for the final GCC build 2020-07-30 05:36:24 -07:00
configure.ac libcpp, libdecnumber: configure and substitute AR 2020-05-23 21:59:02 +00:00
directives.c libcpp: dependency emission tidying 2020-11-03 05:16:19 -08:00
errors.c Update copyright years. 2020-01-01 12:51:42 +01:00
expr.c cpplib: Macro use location and comparison 2020-11-02 08:56:38 -08:00
files.c libcpp: Directly peek for initial line marker 2020-10-08 12:16:21 -07:00
generated_cpp_wcwidth.h Byte vs column awareness for diagnostic-show-locus.c (PR 49973) 2019-12-09 20:03:47 +00:00
identifiers.c [PR 80005] Fix __has_include 2020-01-20 05:39:59 -08:00
init.c libcpp: Provide date routine 2020-11-06 08:59:20 -08:00
internal.h libcpp: Provide date routine 2020-11-06 08:59:20 -08:00
lex.c cpplib: EOF in pragmas 2020-11-03 10:07:20 -08:00
line-map.c c-family: Macro support in -Wmisleading-indentation [PR80076] 2020-09-17 14:27:22 -04:00
location-example.txt PR preprocessor/83173: Enhance -fdump-internal-locations output 2018-11-27 16:04:31 +00:00
macro.c libcpp: Provide date routine 2020-11-06 08:59:20 -08:00
makeucnid.c Update copyright years. 2020-01-01 12:51:42 +01:00
mkdeps.c libcpp: dependency emission tidying 2020-11-03 05:16:19 -08:00
pch.c preprocessor: Make __has_include a builtin macro [PR93452] 2020-01-28 08:02:17 -08:00
symtab.c Update copyright years. 2020-01-01 12:51:42 +01:00
system.h preprocessor: Random cleanups 2020-05-19 13:23:47 -07:00
traditional.c preprocessor: Teach traditional about has_include [PR95889] 2020-07-29 07:47:21 -07:00
ucnid.h Update copyright years. 2020-01-01 12:51:42 +01:00
ucnid.tab Update copyright years. 2020-01-01 12:51:42 +01:00