Hi,
> On 24 May 2016, at 11:59, Dhole <dh...@openmailbox.org> wrote:
> 
> Hey!
> 
> I'm the original author of the SOURCE_DATE_EPOCH patch.
> 
> I've just seen this.  I believe that this bug was fixed in the the
> rework of the patch I sent some days ago [1], although the latest
> version of that patch has not been reviewed yet.  In [1] the
> initialization of source_date_epoch is done at init.c
> (cpp_create_reader), so now it should be initialized properly even when
> just calling the preprocessor.  I tested your example and it gives the
> expected output.
> 
> Although thinking further, maybe it would be more wise to use "0" as a
> default value, to mean "not yet set", so that errors like this are
> avoided.  So source_date_epoch could be:
> 0: not yet set
> negative: disabled
> positive: use this value as SOURCE_DATE_EPOCH
> 
> In such case, SOURCE_DATE_EPOCH would need to be a positive number
> instead of a non-negative number.

0 *is* a valid SOURCE_DATE_EPOCH, ie Jan  1 1970 00:00:00, and should
definitely be allowed.

I see your patch continues to put some of the code inside c-family? Is
there a reason for doing that instead of keeping it all inside libcpp
like mine, given it’s inherently preprocessor-only? You’ve also merged
all the error paths into one message which is not as helpful.

Regards,
James

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to