diff options
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r-- | gdb/c-exp.y | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y index f31dc0759c..74b962d8d2 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; |