From: Doug Evans Date: Fri, 20 Dec 2002 04:54:30 +0000 (+0000) Subject: * cgen-asm.c (cgen_parse_keyword): Added underscore to symbol character X-Git-Tag: cagney-unwind-20030108-branchpoint~254 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d9147ab3ffbb447e22f75c061ae80028acde56e4;p=thirdparty%2Fbinutils-gdb.git * cgen-asm.c (cgen_parse_keyword): Added underscore to symbol character check to fix false keyword trigger with names such as _foo. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 66221d8ed25..f9508749344 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2002-12-19 Nick Kelsey + + * cgen-asm.c (cgen_parse_keyword): Added underscore to symbol character + check to fix false keyword trigger with names such as _foo. + 2002-12-19 Doug Evans * Makefile.am (CGEN_CPUS): New variable. diff --git a/opcodes/cgen-asm.c b/opcodes/cgen-asm.c index 05b62bf49e1..c71c70de08e 100644 --- a/opcodes/cgen-asm.c +++ b/opcodes/cgen-asm.c @@ -225,7 +225,9 @@ cgen_parse_keyword (cd, strp, keyword_table, valuep) /* Allow letters, digits, and any special characters. */ while (((p - start) < (int) sizeof (buf)) && *p - && (ISALNUM (*p) || strchr (keyword_table->nonalpha_chars, *p))) + && (ISALNUM (*p) + || *p == '_' + || strchr (keyword_table->nonalpha_chars, *p))) ++p; if (p - start >= (int) sizeof (buf))