aboutsummaryrefslogtreecommitdiff
path: root/gdb/expread.y
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/expread.y')
-rw-r--r--gdb/expread.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/expread.y b/gdb/expread.y
index 8af164e..f088511 100644
--- a/gdb/expread.y
+++ b/gdb/expread.y
@@ -27,13 +27,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
come first in the result. */
%{
+#include <stdio.h>
#include "defs.h"
#include "param.h"
#include "symtab.h"
#include "frame.h"
#include "expression.h"
-#include <stdio.h>
#include <a.out.h>
static struct expression *expout;
@@ -1283,7 +1283,8 @@ yylex ()
if (!(c == '_' || c == '$'
|| (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
- error ("Invalid token in expression.");
+ /* We must have come across a bad character (e.g. ';'). */
+ error ("Invalid character '%c' in expression.", c);
/* It's a name. See how long it is. */
namelen = 0;