Re: [PATCH] Detect __DATE__ and __TIME__ correctly.

Justin Lebar <[email protected]>
Newsgroups gmane.comp.compilers.ccache
Message-ID <CAFWcpZ60pMzoD=wsfnHZRad3A6=naYthf7My0PdDK0m2=uPPZg@mail.gmail.com>
Can you update the Python script in the comment right above the code
and confirm that it matches your new table?  It's hard for me to see
what you did here based on just the patch...

On Tue, Oct 9, 2012 at 10:43 AM, Andrew Stubbs <[email protected]> wrote:
> On 08/10/12 19:25, Justin Lebar wrote:
>>
>> I think this fails on at least one edge case: If the file contains
>> only the string "__date__", then len == i == 8 and we never enter the
>> loop, right?  I think we in general fail to detect temporal macros at
>> the very end of the file, with this patch.
>>
>> The solution isn't as simple as making it |i <= len|, of course,
>> because the end of the loop reads str[i].
>
>
> Grrr, those pesky fenceposts!
>
> Ok, after looking at it some more, I think the correct solution is to fix
> the table, not the code.
>
> New patch attached.
>
> Thanks
>
> Andrew
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.