]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
genmodes.c (tagged_printf, [...]): Don't use %n on printf.
authorPaolo Bonzini <bonzini@gnu.org>
Wed, 6 Jun 2007 15:43:29 +0000 (15:43 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Wed, 6 Jun 2007 15:43:29 +0000 (15:43 +0000)
2007-06-06  Paolo Bonzini  <bonzini@gnu.org>

* genmodes.c (tagged_printf, emit_insn_modes_h): Don't
use %n on printf.

From-SVN: r125494

gcc/ChangeLog
gcc/genmodes.c

index 24097297e5097d095db806e79fb86ce09ea3bf52..4059bb161bac77b4e788fc8b858a12dc952c9e88 100644 (file)
@@ -1,3 +1,8 @@
+2007-06-06  Paolo Bonzini  <bonzini@gnu.org>
+
+       * genmodes.c (tagged_printf, emit_insn_modes_h): Don't
+       use %n on printf.
+
 2007-06-06  Zdenek Dvorak  <dvorakz@suse.cz>
 
        * haifa-sched.c (restore_bb_notes): Clear bb field of the notes
index 97e194bebd42f80861dd00cf5e0059c96034e523..8e71a123edb46166a16971bbf1862c2a0cfcf1b9 100644 (file)
@@ -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);
       }