From c1ea0529c34fac6ae3752680aa37c67210ae1f06 Mon Sep 17 00:00:00 2001 From: froydnj Date: Tue, 29 Jun 2010 20:54:53 +0000 Subject: [PATCH] * genhooks.c (emit_findices): Cast field precision to int. (emit_documentation): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161568 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/genhooks.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 11d901d..ee6c6fa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-06-29 Nathan Froyd + + * genhooks.c (emit_findices): Cast field precision to int. + (emit_documentation): Likewise. + 2010-06-29 Jakub Jelinek PR tree-optimization/43801 diff --git a/gcc/genhooks.c b/gcc/genhooks.c index 66d3633..a9eecd7 100644 --- a/gcc/genhooks.c +++ b/gcc/genhooks.c @@ -52,7 +52,7 @@ emit_findices (const char *doc, const char *hook_name) doc = strchr (fcode, '}'); if (!doc) fatal ("Malformed @Fcode for hook %s\n", hook_name); - printf ("@findex %.*s\n", doc - fcode, fcode); + printf ("@findex %.*s\n", (int) (doc - fcode), fcode); doc = fcode; } } @@ -238,9 +238,9 @@ emit_documentation (const char *in_fname) /* Type names like 'int' are followed by a space, sometimes also by '*'. 'void' should appear only in "(void)". */ if (*e == ' ' || *e == '*' || *q == '(') - printf ("%.*s", e - q + 1, q); + printf ("%.*s", (int) (e - q + 1), q); else - printf ("@var{%.*s}%c", e - q, q, *e); + printf ("@var{%.*s}%c", (int) (e - q), q, *e); } /* POD-valued hooks sometimes come in groups with common documentation.*/ @@ -265,8 +265,8 @@ emit_documentation (const char *in_fname) /* Print paragraph, emitting @Fcode as @code. */ for (; (fcode = strstr (doc, "@Fcode{")) && fcode < p_end; doc = fcode + 2) - printf ("%.*s@", fcode - doc, doc); - printf ("%.*s", p_end - doc, doc); + printf ("%.*s@", (int) (fcode - doc), doc); + printf ("%.*s", (int) (p_end - doc), doc); /* Emit function indices for next paragraph. */ emit_findices (p_end, name); } -- 2.7.4