re PR preprocessor/71183 (gcc -E always gives __DATE__ and __TIME__ as Jan 1 1970 00:00:00)
PR preprocessor/71183 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch to cb_get_source_date_epoch. * gcc.dg/cpp/source_date_epoch-3.c: New test. From-SVN: r237408
This commit is contained in:
parent
755fa6662d
commit
ef7cf206b6
@ -1,3 +1,9 @@
|
||||
2016-06-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR preprocessor/71183
|
||||
* c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
|
||||
to cb_get_source_date_epoch.
|
||||
|
||||
2016-06-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/68657
|
||||
|
@ -150,6 +150,7 @@ init_pp_output (FILE *out_stream)
|
||||
}
|
||||
|
||||
cb->has_attribute = c_common_has_attribute;
|
||||
cb->get_source_date_epoch = cb_get_source_date_epoch;
|
||||
|
||||
/* Initialize the print structure. */
|
||||
print.src_line = 1;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2016-06-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR preprocessor/71183
|
||||
* gcc.dg/cpp/source_date_epoch-3.c: New test.
|
||||
|
||||
2016-06-13 Jeff Law <law@redhat.com>
|
||||
|
||||
PR tree-optimization/71403
|
||||
|
9
gcc/testsuite/gcc.dg/cpp/source_date_epoch-3.c
Normal file
9
gcc/testsuite/gcc.dg/cpp/source_date_epoch-3.c
Normal file
@ -0,0 +1,9 @@
|
||||
/* PR preprocessor/71183 */
|
||||
/* { dg-do preprocess } */
|
||||
/* { dg-set-compiler-env-var SOURCE_DATE_EPOCH "630333296" } */
|
||||
|
||||
const char *date = __DATE__;
|
||||
const char *time = __TIME__;
|
||||
|
||||
/* { dg-final { scan-file source_date_epoch-3.i "Dec 22 1989" } } */
|
||||
/* { dg-final { scan-file source_date_epoch-3.i "12:34:56" } } */
|
Loading…
x
Reference in New Issue
Block a user