aboutsummaryrefslogtreecommitdiff
path: root/gcc/genattrtab.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-09-16 22:20:44 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-09-16 22:20:44 +0000
commit92a438d13c876561ee189d9eb274f2dd8151ac91 (patch)
tree5e3393cc1483b31e95e58de4c913fd832b1ce906 /gcc/genattrtab.c
parent7bd41ea6c8e6e08d4382230a82e6655c0d0ab477 (diff)
downloadgcc-92a438d13c876561ee189d9eb274f2dd8151ac91.zip
gcc-92a438d13c876561ee189d9eb274f2dd8151ac91.tar.gz
gcc-92a438d13c876561ee189d9eb274f2dd8151ac91.tar.bz2
system.h (CTYPE_CONV, [...]): New macros.
* system.h (CTYPE_CONV, TOUPPER, TOLOWER): New macros. Use CTYPE_CONV in all ctype macros. * cccp.c (initialize_char_syntax): Use uppercase ctype macro from system.h. * cexp.y (initialize_random_junk): Likewise. * c4x.c (c4x_interrupt_function_p, c4x_handle_pragma): Likewise. * i370.c (handle_pragma): Likewise. * i370.h (ASM_OUTPUT_LABELREF, ASM_OUTPUT_ASCII): Likewise. * v850.c (override_options): Likewise. * doprint.c (_doprnt): Likewise. * fixinc/fixincl.c (main, quoted_file_exists, extract_quoted_files): Likewise. * fixinc/server.c (load_data): Likewise. * fold-const.c (real_hex_to_f): Likewise. * genattr.c (write_upcase, gen_attr): Likewise. * genattrtab.c (convert_const_symbol_ref, evaluate_eq_attr, write_upcase): Likewise. * genemit.c (print_code): Likewise. * genopinit.c (gen_insn): Likewise. * genpeep.c (print_code): Likewise. * genrecog.c (print_code): Likewise. * optabs.c (init_libfuncs): Likewise. ch: * lex.c (maybe_downcase, getlc, handle_generic_pragma, check_newline): Likewise. f: * bad.c (ffebad_finish): Likewise. * fini.c (main): Likewise. * intrin.c (ffeintrin_init_0): Likewise. * lex.c (ffelex_hash_): Likewise. * src.c (ffesrc_init_1): Likewise. From-SVN: r29463
Diffstat (limited to 'gcc/genattrtab.c')
-rw-r--r--gcc/genattrtab.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index f0ba4de..f35e0e4 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -434,7 +434,7 @@ static void write_attr_case PROTO((struct attr_desc *, struct attr_value *,
static void write_unit_name PROTO((const char *, int, const char *));
static void write_attr_valueq PROTO((struct attr_desc *, char *));
static void write_attr_value PROTO((struct attr_desc *, rtx));
-static void write_upcase PROTO((char *));
+static void write_upcase PROTO((const char *));
static void write_indent PROTO((int));
static void write_eligible_delay PROTO((const char *));
static void write_function_unit_info PROTO((void));
@@ -1354,8 +1354,7 @@ convert_const_symbol_ref (exp, attr)
strcat (p, "_");
strcat (p, XSTR (av->value, 0));
for (; *p != '\0'; p++)
- if (ISLOWER(*p))
- *p = toupper (*p);
+ *p = TOUPPER (*p);
value = attr_rtx (SYMBOL_REF, string);
RTX_UNCHANGING_P (value) = 1;
@@ -2838,8 +2837,7 @@ evaluate_eq_attr (exp, value, insn_code, insn_index)
strcat (string, "_");
strcat (string, XSTR (exp, 1));
for (p = string; *p ; p++)
- if (ISLOWER(*p))
- *p = toupper (*p);
+ *p = TOUPPER (*p);
newexp = attr_rtx (EQ, value,
attr_rtx (SYMBOL_REF,
@@ -5351,13 +5349,14 @@ write_attr_value (attr, value)
static void
write_upcase (str)
- char *str;
+ const char *str;
{
while (*str)
- if (ISLOWER(*str))
- printf ("%c", toupper(*str++));
- else
- printf ("%c", *str++);
+ {
+ /* The argument of TOUPPER should not have side effects. */
+ putchar (TOUPPER(*str));
+ str++;
+ }
}
static void