aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.y
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1995-03-15 19:18:26 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1995-03-15 19:18:26 +0000
commit961b8ebd2789869084121a8e666cb85eab7361d7 (patch)
tree68c5fc565eee890025320b8b436ead7aa4552f12 /gdb/c-exp.y
parentde906b511e01f4538f5a07bb329a88431619425f (diff)
downloadgdb-961b8ebd2789869084121a8e666cb85eab7361d7.zip
gdb-961b8ebd2789869084121a8e666cb85eab7361d7.tar.gz
gdb-961b8ebd2789869084121a8e666cb85eab7361d7.tar.bz2
* c-exp.y (yylex): Make an empty character constant an error.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r--gdb/c-exp.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index f31dc07..74b962d 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;