array[-1] -- permitted?

Dave Jones djones at megatest.UUCP
Fri Sep 23 05:43:44 AEST 1988


>From article <1237 at imagine.PAWL.RPI.EDU>, by kyriazis at rpics (George Kyriazis):
...
> 
>     (b)	yacc uses array[-1].  If it is considered
> invalid, that will mean that yacc has to be rewriten for the new standard?
> 

There's more.  Here's some code I ripped directly from a y.tab.c
(yacc output) of a compiler I'm working on:

case 28:
# line 160 "gram.y"
{ Mpc_insert_with_searchdir(yypvt[-3],yypvt[-1]);
                          yyval = tree(N_INSERT_DECL3);} break;
case 29:
# line 166 "gram.y"
{ yyval= tree(N_CONST_DECL); } break;
case 30:
# line 171 "gram.y"
{  yyval= list(L_CONST_DECL_LIST, (Node*)0, yypvt[-0]); } break; 

'Nuff said?

I missed some of the early postings on this subject.  Could someone
be kind enough to bring me up to date?  Is the committee going to
break this code?  If so, why, fer Pete's sake?



More information about the Comp.lang.c mailing list