Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/common/lib/libc/stdlib



On Sat, Nov 14, 2015 at 06:40:21AM +1100, matthew green wrote:
> Christos Zoulas writes:
> > In article <20151113111144.GA13379%britannica.bec.de@localhost>,
> > Joerg Sonnenberger  <joerg%britannica.bec.de@localhost> wrote:
> > >On Thu, Nov 12, 2015 at 12:23:51PM -0500, Christos Zoulas wrote:
> > >> Module Name:	src
> > >> Committed By:	christos
> > >> Date:		Thu Nov 12 17:23:51 UTC 2015
> > >> 
> > >> Modified Files:
> > >> 	src/common/lib/libc/stdlib: _strtol.h _strtoul.h
> > >> 
> > >> Log Message:
> > >> Recognize 0[bB] as binary (base 2)
> > >
> > >Based on what authority? This is a ISO C function and that doesn't allow
> > >binary input. I am quite concerned about changing a function used that
> > >often, especially as it can break a lot of existing code.
> > 
> > I don't think it will since it will only affect conversions with 0[bB],
> > and the OS/X code is doing the same, but I will revert it until others
> > catch up.
> 
> the problem is that something that was "0b<something>" always came out
> as 0 before, but now it doesn't.
> 
> that's a fairly major semantic change, i think i agree with joerg that
> it has a high chance of breaking existing usage.

Worse that that, some code might be relying on getting a pointer
to the 'b' and continuing to parse the buffer.

Not a good idea to change it.

	David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index