diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 24097297e50..4059bb161ba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-06-06 Paolo Bonzini + + * genmodes.c (tagged_printf, emit_insn_modes_h): Don't + use %n on printf. + 2007-06-06 Zdenek Dvorak * haifa-sched.c (restore_bb_notes): Clear bb field of the notes diff --git a/gcc/genmodes.c b/gcc/genmodes.c index 97e194bebd4..8e71a123edb 100644 --- a/gcc/genmodes.c +++ b/gcc/genmodes.c @@ -786,8 +786,7 @@ calc_wider_mode (void) /* Output routines. */ #define tagged_printf(FMT, ARG, TAG) do { \ - int count_; \ - printf (" " FMT ",%n", ARG, &count_); \ + int count_ = printf (" " FMT ",", ARG); \ printf ("%*s/* %s */\n", 27 - count_, "", TAG); \ } while (0) @@ -821,8 +820,7 @@ enum machine_mode\n{"); for (c = 0; c < MAX_MODE_CLASS; c++) for (m = modes[c]; m; m = m->next) { - int count_; - printf (" %smode,%n", m->name, &count_); + int count_ = printf (" %smode,", m->name); printf ("%*s/* %s:%d */\n", 27 - count_, "", trim_filename (m->file), m->line); }