From 0679c128108e89f90172c6283d313648bf74396b Mon Sep 17 00:00:00 2001 From: apbianco Date: Thu, 20 Apr 2000 02:52:26 +0000 Subject: [PATCH] 2000-04-19 Alexandre Petit-Bianco * parse.y (yyerror): `msg' can be null, don't use it in that case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33270 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/ChangeLog | 4 ++++ gcc/java/parse.c | 2 +- gcc/java/parse.y | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index dc1d3e0..8d2ba83 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2000-04-19 Alexandre Petit-Bianco + + * parse.y (yyerror): `msg' can be null, don't use it in that case. + 2000-04-19 Tom Tromey * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop. diff --git a/gcc/java/parse.c b/gcc/java/parse.c index ef9401b..ac7bdac 100644 --- a/gcc/java/parse.c +++ b/gcc/java/parse.c @@ -5630,7 +5630,7 @@ yyerror (msg) else java_error_count++; - if (elc.col == 0 && msg[1] == ';') + if (elc.col == 0 && msg && msg[1] == ';') { elc.col = ctxp->p_line->char_col-1; elc.line = ctxp->p_line->lineno; diff --git a/gcc/java/parse.y b/gcc/java/parse.y index dc41808..d427c34 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -2932,7 +2932,7 @@ yyerror (msg) else java_error_count++; - if (elc.col == 0 && msg[1] == ';') + if (elc.col == 0 && msg && msg[1] == ';') { elc.col = ctxp->p_line->char_col-1; elc.line = ctxp->p_line->lineno; -- 2.7.4