[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [PATCH] allow binary coded literals
- From: Sam Roberts <vieuxtech@...>
- Date: Thu, 5 Feb 2009 12:04:55 -0800
On Thu, Feb 5, 2009 at 9:39 AM, Tony Finch <email@example.com> wrote:
> On Wed, 4 Feb 2009, Rene Rebe wrote:
>> this simple two-liner allows for binary coded literal constants
>> in the lexxer.
> 0b is not supported by many versions of strtol().
It appears the patch doesn't pass the "0b" prefix to strtol(), it
strips it, and requests base conversion using the last argument to
I like it, its nice for bit fields, and it would be nice to have a %b
string.format specifier, too.
Don't know if it effects backwards compatibility. Because 0b used to
be illegal, it doesn't change the meaning of legal programs. Unless
code is relying on 0b being an invalid prefix...