diff options
author | Vern Paxson <vern@ee.lbl.gov> | 1995-03-27 14:36:45 +0000 |
---|---|---|
committer | Vern Paxson <vern@ee.lbl.gov> | 1995-03-27 14:36:45 +0000 |
commit | 23db8cf3cee2d936db60e7c275d82093b656b654 (patch) | |
tree | 8a101476ac3d89924595687361eec517483a572c /gen.c | |
parent | 7220b1e31077a70c20b604d2ff21c7103856dca0 (diff) |
fixed lint problem with declaring yy_cp unnecessarily
Diffstat (limited to 'gen.c')
-rw-r--r-- | gen.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -663,9 +663,12 @@ int worry_about_NULs; void gen_NUL_trans() { /* NOTE - changes in here should be reflected in gen_next_match() */ + /* Only generate a definition for "yy_cp" if we'll generate code + * that uses it. Otherwise lint and the like complain. + */ int need_backing_up = (num_backing_up > 0 && ! reject); - if ( need_backing_up ) + if ( need_backing_up && ! nultrans ) /* We'll need yy_cp lying around for the gen_backing_up(). */ indent_puts( "register char *yy_cp = yy_c_buf_p;" ); |