Allow embedded timestamps by C/C++ macros to be set externally (3)
Andreas Schwab
schwab@linux-m68k.org
Tue May 10 11:24:00 GMT 2016
Dhole <dhole@openmailbox.org> writes:
> On 16-05-06 08:26:07, Andreas Schwab wrote:
>> Eduard Sanou <eduardsanou@openmailbox.org> writes:
>>
>> > diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
>> > index 1714284..dea2900 100644
>> > --- a/gcc/c-family/c-common.h
>> > +++ b/gcc/c-family/c-common.h
>> > @@ -1086,6 +1086,16 @@ extern vec<tree, va_gc> *make_tree_vector_copy (const vec<tree, va_gc> *);
>> > c_register_builtin_type. */
>> > extern GTY(()) tree registered_builtin_types;
>> >
>> > +/* Read SOURCE_DATE_EPOCH from environment to have a deterministic
>> > + timestamp to replace embedded current dates to get reproducible
>> > + results. Returns -1 if SOURCE_DATE_EPOCH is not defined. */
>> > +extern time_t cb_get_source_date_epoch (cpp_reader *pfile);
>> > +
>> > +/* The value (as a unix timestamp) corresponds to date
>> > + "Dec 31 9999 23:59:59 UTC", which is the latest date that __DATE__ and
>> > + __TIME__ can store. */
>> > +#define MAX_SOURCE_DATE_EPOCH 253402300799
>>
>> This is bigger than INT_MAX, doesn't it trigger a warning that breaks
>> bootstrap?
>
> Sorry but I don't understand the issue. Is defining a macro to a
> integer bigger than INT_MAX invalid?
Did it survive bootstrap?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Gcc-patches
mailing list