public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* RFA (build): enum conversion fix for genopinit FIXUNS_TRUNC_LIKE_FIX_TRUNC code
@ 2010-11-04 19:57 Joern Rennecke
  2010-11-04 20:33 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Joern Rennecke @ 2010-11-04 19:57 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: pr44756-h8300-genopinit-patch --]
[-- Type: text/plain, Size: 1246 bytes --]

The h8300-elf --enable-werror-all build has found some generated code
in insn-optint.c that passes integers to functions that expect
enum machine_mode arguments.

Fixed with the genopinit.c patch below.

bootstrapped on i686-pc-linux-gnu.

An alternative approach would have been to declare the iteration variables
as enum machine_mode, but then a cast would have been requierd for each
iteration variable increment.

2010-11-04  Joern Rennecke  <amylaar@spamcop.net>

	PR bootstrap/44756
	* genopinit.c (main) [FIXUNS_TRUNC_LIKE_FIX_TRUNC]: Cast
	iteration variables to enum machine_mode.

Index: genopinit.c
===================================================================
--- genopinit.c	(revision 166313)
+++ genopinit.c	(working copy)
@@ -524,8 +524,9 @@ from the machine description file `md'. 
   for (i = 0; i < NUM_MACHINE_MODES; i++)\n\
     for (j = 0; j < NUM_MACHINE_MODES; j++)\n\
       set_convert_optab_handler\n\
- 	(ufixtrunc_optab, i, j,\n\
-	 convert_optab_handler (sfixtrunc_optab, i, j));\n\
+ 	(ufixtrunc_optab, (enum machine_mode) i, (enum machine_mode) j,\n\
+	 convert_optab_handler (sfixtrunc_optab, (enum machine_mode) i,\n\
+						 (enum machine_mode) j));\n\
 #endif\n\
 }");
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RFA (build): enum conversion fix for genopinit FIXUNS_TRUNC_LIKE_FIX_TRUNC code
  2010-11-04 19:57 RFA (build): enum conversion fix for genopinit FIXUNS_TRUNC_LIKE_FIX_TRUNC code Joern Rennecke
@ 2010-11-04 20:33 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2010-11-04 20:33 UTC (permalink / raw)
  To: Joern Rennecke; +Cc: gcc-patches

On 11/04/2010 12:56 PM, Joern Rennecke wrote:
> 	PR bootstrap/44756
> 	* genopinit.c (main) [FIXUNS_TRUNC_LIKE_FIX_TRUNC]: Cast
> 	iteration variables to enum machine_mode.

Ok.


r~

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-04 20:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-04 19:57 RFA (build): enum conversion fix for genopinit FIXUNS_TRUNC_LIKE_FIX_TRUNC code Joern Rennecke
2010-11-04 20:33 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).