From 961b8ebd2789869084121a8e666cb85eab7361d7 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Wed, 15 Mar 1995 19:18:26 +0000 Subject: [PATCH] * c-exp.y (yylex): Make an empty character constant an error. --- gdb/ChangeLog | 4 ++++ gdb/c-exp.y | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 013bf0933b7..bfc9b89d3ca 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +Wed Mar 15 10:58:26 1995 Jim Kingdon (kingdon@lioth.cygnus.com) + + * c-exp.y (yylex): Make an empty character constant an error. + Tue Mar 14 15:00:54 1995 Per Bothner * valops.c (value_arg_coerce): Do possible value_coerce_array diff --git a/gdb/c-exp.y b/gdb/c-exp.y index f31dc0759c8..74b962d8d2b 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -1177,6 +1177,8 @@ yylex () c = *lexptr++; if (c == '\\') c = parse_escape (&lexptr); + else if (c == '\'') + error ("Empty character constant."); yylval.typed_val.val = c; yylval.typed_val.type = builtin_type_char; -- 2.30.2