gcc/libcpp
Eduard Sanou 15c98b2e0d c-common.c (get_source_date_epoch): Rename to cb_get_source_date_epoch.
gcc/c-family/ChangeLog:

2016-05-13  Eduard Sanou  <dhole@openmailbox.org>

	* c-common.c (get_source_date_epoch): Rename to
	cb_get_source_date_epoch.
	* c-common.c (cb_get_source_date_epoch): Use a single generic erorr
	message when the parsing fails.  Use error_at instead of fatal_error.
	* c-common.h (get_source_date_epoch): Rename to
	cb_get_source_date_epoch.
	* c-common.h (cb_get_source_date_epoch): Prototype.
	* c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
	* c-common.h (c_omp_region_type): Remove trailing comma.
	* c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
	* c-lex.c (c_lex_with_flags): Remove initialization of
	pfile->source_date_epoch.

gcc/ChangeLog:

2016-05-13  Eduard Sanou  <dhole@openmailbox.org>

	* doc/cppenv.texi: Note that the `%s` in `date` is a non-standard
	extension.
	* gcc.c (driver_handle_option): Call set_source_date_epoch_envvar.
	* gcc.c (set_source_date_epoch_envvar): New function, sets
	the SOURCE_DATE_EPOCH environment variable to the current time.

gcc/testsuite/ChangeLog:

2016-05-13  Eduard Sanou  <dhole@openmailbox.org>

	* gcc.dg/cpp/source_date_epoch-1.c: New file, test the proper
	behaviour of the macros __DATE__ and __TIME__ when SOURCE_DATE_EPOCH
	env var is set.
	* gcc.dg/cpp/source_date_epoch-2.c: New file, test the error output
	when parsing the SOURCE_DATE_EPOCH env var, and make sure it is only
	shown once.
	* lib/gcc-dg.exp (dg-set-compiler-env-var): New function, set env vars
	during compilation.
	* lib/gcc-dg.exp (restore-compiler-env-var): New function, restore env
	vars set by dg-set-compiler-env-var.

libcpp/ChangeLog:

2016-05-13  Eduard Sanou  <dhole@openmailbox.org>

	* include/cpplib.h (cpp_callbacks): Add get_source_date_epoch
	callback.
	* include/cpplib.h (cpp_init_source_date_epoch): Remove prototype.
	* init.c (cpp_init_source_date_epoch): Remove function.
	* init.c (cpp_create_reader): Initialize pfile->source_date_epoch.
	* internal.h (cpp_reader): Extend comment about source_date_epoch.
	* macro.c (_cpp_builtin_macro_text): Use get_source_date_epoch
	callback only once, read pfile->source_date_epoch on future passes.
	Check that get_source_date_epoch callback is not NULL.

From-SVN: r237001
2016-06-01 16:42:41 +00:00
..
include c-common.c (get_source_date_epoch): Rename to cb_get_source_date_epoch. 2016-06-01 16:42:41 +00:00
po * da.po: Update. 2016-05-18 01:13:34 +01:00
ChangeLog c-common.c (get_source_date_epoch): Rename to cb_get_source_date_epoch. 2016-06-01 16:42:41 +00:00
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
Makefile.in Update copyright years. 2016-01-04 15:30:50 +01:00
aclocal.m4 libcpp: Bump to automake 1.11.6 2015-05-13 11:02:17 +00:00
charset.c re PR c++/69628 (Conditional jump or move depends on uninitialised value(s) in lex_charconst(cpp_token const*) (c-lex.c:1252)) 2016-02-05 20:39:48 +01:00
config.in Change ENABLE_VALGRIND_CHECKING to 2016-05-20 08:03:25 +00:00
configure Change ENABLE_VALGRIND_CHECKING to 2016-05-20 08:03:25 +00:00
configure.ac Change ENABLE_VALGRIND_CHECKING to 2016-05-20 08:03:25 +00:00
directives-only.c Update copyright years. 2016-01-04 15:30:50 +01:00
directives.c re PR preprocessor/69650 (ICE in linemap_line_start, at libcpp/line-map.c:803) 2016-04-13 11:40:37 +00:00
errors.c PR preprocessor/69664: fix rich_location::override_column 2016-02-08 17:33:45 +00:00
expr.c expr.c (cpp_classify_number): Hex floats are new in C++1z. 2016-03-15 08:08:31 -04:00
files.c re PR pch/68176 (all pch tests fail on eglibc systems (with bits/predefs.h)) 2016-01-28 23:35:20 +01:00
identifiers.c Update copyright years. 2016-01-04 15:30:50 +01:00
init.c c-common.c (get_source_date_epoch): Rename to cb_get_source_date_epoch. 2016-06-01 16:42:41 +00:00
internal.h c-common.c (get_source_date_epoch): Rename to cb_get_source_date_epoch. 2016-06-01 16:42:41 +00:00
lex.c Change ENABLE_VALGRIND_CHECKING to 2016-05-20 08:03:25 +00:00
line-map.c re PR preprocessor/69650 (ICE in linemap_line_start, at libcpp/line-map.c:803) 2016-03-25 10:15:39 -06:00
location-example.txt Source range tracking in libcpp and C FE, with bit-packing optimization 2015-11-13 16:29:59 +00:00
macro.c c-common.c (get_source_date_epoch): Rename to cb_get_source_date_epoch. 2016-06-01 16:42:41 +00:00
makeucnid.c Update copyright years. 2016-01-04 15:30:50 +01:00
mkdeps.c Update copyright years. 2016-01-04 15:30:50 +01:00
pch.c Update copyright years. 2016-01-04 15:30:50 +01:00
symtab.c Update copyright years. 2016-01-04 15:30:50 +01:00
system.h Update copyright years. 2016-01-04 15:30:50 +01:00
traditional.c Update copyright years. 2016-01-04 15:30:50 +01:00
ucnid.h Update copyright years. 2016-01-04 15:30:50 +01:00
ucnid.tab Update copyright years. 2016-01-04 15:30:50 +01:00