Re: yacc stdc output

2014-02-18 Thread Ted Unangst
On Mon, Feb 17, 2014 at 15:57, Todd C. Miller wrote:
 On Mon, 17 Feb 2014 17:30:41 -0500, Ted Unangst wrote:
 
 I don't see how KR compat helps us. None of the headers in
 /usr/include are KR anymore. How would one compile the generated output?
 
 You're assuming that the resulting code will be built on OpenBSD.
 That's a bad assumption.  The code generated by lex and yacc should
 be as portable as possible.

True, I phrased that poorly. What I'm assuming is that the code will
be built by a compiler that supports the const keyword. Or in other
words, if you're using a 25 year old cross compiler, I don't think
it's unreasonable to expect you to dig up a 25 year old cross yacc
either (or the yacc from openbsd 5.4).

Who is actually using yacc to generate code for a compilter that
doesn't accept const?



Re: yacc stdc output

2014-02-18 Thread Todd C. Miller
On Tue, 18 Feb 2014 16:38:07 -0500, Ted Unangst wrote:

 True, I phrased that poorly. What I'm assuming is that the code will
 be built by a compiler that supports the const keyword. Or in other
 words, if you're using a 25 year old cross compiler, I don't think
 it's unreasonable to expect you to dig up a 25 year old cross yacc
 either (or the yacc from openbsd 5.4).
 
 Who is actually using yacc to generate code for a compiler that
 doesn't accept const?

Sudo 1.7.x still compiles on KR, mostly for the benefit of the
bundled HP-UX compiler that has C89 support disabled.

 - todd



Re: yacc stdc output

2014-02-18 Thread Marc Espie
On Tue, Feb 18, 2014 at 02:50:53PM -0700, Todd C. Miller wrote:
 On Tue, 18 Feb 2014 16:38:07 -0500, Ted Unangst wrote:
 
  True, I phrased that poorly. What I'm assuming is that the code will
  be built by a compiler that supports the const keyword. Or in other
  words, if you're using a 25 year old cross compiler, I don't think
  it's unreasonable to expect you to dig up a 25 year old cross yacc
  either (or the yacc from openbsd 5.4).
  
  Who is actually using yacc to generate code for a compiler that
  doesn't accept const?
 
 Sudo 1.7.x still compiles on KR, mostly for the benefit of the
 bundled HP-UX compiler that has C89 support disabled.
 
  - todd
Come on Jim, it's dead.



Re: yacc stdc output

2014-02-18 Thread Todd C. Miller
On Tue, 18 Feb 2014 23:05:23 +0100, Marc Espie wrote:

 Come on Jim, it's dead.

I'm a doctor, not a programmer!  Err, wait...

 - todd



Re: yacc stdc output

2014-02-18 Thread Theo de Raadt
On Tue, 18 Feb 2014 16:38:07 -0500, Ted Unangst wrote:

 True, I phrased that poorly. What I'm assuming is that the code will
 be built by a compiler that supports the const keyword. Or in other
 words, if you're using a 25 year old cross compiler, I don't think
 it's unreasonable to expect you to dig up a 25 year old cross yacc
 either (or the yacc from openbsd 5.4).
 
 Who is actually using yacc to generate code for a compiler that
 doesn't accept const?

Sudo 1.7.x still compiles on KR, mostly for the benefit of the
bundled HP-UX compiler that has C89 support disabled.

That feels like a disservice to the world.