aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.y
diff options
context:
space:
mode:
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;