Re: allocation simplifications in yacc

2015-12-30 Thread Ted Unangst
Michael McConville wrote: > Christian Weisgerber wrote: > > Christian Weisgerber: > > > > > The removal of the casts causes a problem in ports/devel/mico, where > > > the yacc output is used in C++: > > > > Also: > > graphics/grap > > math/aamath > > math/logic2cnf > > ok? > "

Re: allocation simplifications in yacc

2015-12-30 Thread Mark Kettenis
> Date: Wed, 30 Dec 2015 11:30:11 -0500 > From: Michael McConville > > Christian Weisgerber wrote: > > Christian Weisgerber: > > > > > The removal of the casts causes a problem in ports/devel/mico, where > > > the yacc output is used in C++: > > > > Also: > > graphics/grap

Re: allocation simplifications in yacc

2015-12-30 Thread Ted Unangst
Mark Kettenis wrote: > > Date: Wed, 30 Dec 2015 11:30:11 -0500 > > From: Michael McConville > > > > Christian Weisgerber wrote: > > > Christian Weisgerber: > > > > > > > The removal of the casts causes a problem in ports/devel/mico, where > > > > the yacc output is used in

Re: allocation simplifications in yacc

2015-12-30 Thread Michael McConville
Christian Weisgerber wrote: > Christian Weisgerber: > > > The removal of the casts causes a problem in ports/devel/mico, where > > the yacc output is used in C++: > > Also: > graphics/grap > math/aamath > math/logic2cnf ok? Index: skeleton.c

Re: allocation simplifications in yacc

2015-12-30 Thread Christian Weisgerber
Michael McConville: > Index: skeleton.c > === > RCS file: /cvs/src/usr.bin/yacc/skeleton.c,v > retrieving revision 1.35 > diff -u -p -r1.35 skeleton.c > --- skeleton.c16 Mar 2014 18:38:30 - 1.35 > +++ skeleton.c

Re: allocation simplifications in yacc

2015-12-30 Thread Christian Weisgerber
Christian Weisgerber: > The removal of the casts causes a problem in ports/devel/mico, where > the yacc output is used in C++: Also: graphics/grap math/aamath math/logic2cnf -- Christian "naddy" Weisgerber na...@mips.inka.de

Re: allocation simplifications in yacc

2015-12-25 Thread Theo Buehler
On Thu, Dec 24, 2015 at 12:41:28PM -0500, Michael McConville wrote: > 1. realloc acts like malloc when ptr == NULL Why not "#endif", - "if (newsize && YY_SIZE_MAX / newsize < sizeof *newss)", - "goto bail;", - "newss = yyss ? (short *)realloc(yyss,

Re: allocation simplifications in yacc

2015-12-25 Thread Theo Buehler
On Fri, Dec 25, 2015 at 02:34:12PM +0100, Mark Kettenis wrote: > IMNSHO the code produced by OpenBSD's yacc should be portable; > reallocarray isn't portable. ok, thanks for clarifying

Re: allocation simplifications in yacc

2015-12-25 Thread Mark Kettenis
> Date: Fri, 25 Dec 2015 14:17:19 +0100 > From: Theo Buehler > > On Thu, Dec 24, 2015 at 12:41:28PM -0500, Michael McConville wrote: > > 1. realloc acts like malloc when ptr == NULL > > Why not > > "#endif", > - "if (newsize && YY_SIZE_MAX / newsize < sizeof

allocation simplifications in yacc

2015-12-24 Thread Michael McConville
1. realloc acts like malloc when ptr == NULL 2. no need to check for NULL before free ok? ? cscope.out Index: skeleton.c === RCS file: /cvs/src/usr.bin/yacc/skeleton.c,v retrieving revision 1.35 diff -u -p -r1.35 skeleton.c ---

Re: allocation simplifications in yacc

2015-12-24 Thread Michael McConville
Michael McConville wrote: > 1. realloc acts like malloc when ptr == NULL > 2. no need to check for NULL before free > > ok? I found the same pair in libc. ok? Index: lib/libc/time/strftime.c === RCS file: