Patchwork RFA: Fix bootstrap/44512 (2/2)

login
register
mail settings
Submitter Joern Rennecke
Date June 17, 2010, 2:09 p.m.
Message ID <20100617100925.0a3tvw6iq044c4wg-nzlynne@webmail.spamcop.net>
Download mbox | patch
Permalink /patch/56051/
State New
Headers show

Comments

Joern Rennecke - June 17, 2010, 2:09 p.m.
This fixes the "invalid conversion from 'int' to 'cpp_builtin_type'" issue.
bootstrapped and regtested in trunk revision 160890.
2010-06-17  Joern Rennecke  <joern.rennecke@embecosm.com>

	PR bootstrap/44512
	* c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
	for C++ standard compliance.
Joseph S. Myers - June 17, 2010, 2:31 p.m.
On Thu, 17 Jun 2010, Joern Rennecke wrote:

> This fixes the "invalid conversion from 'int' to 'cpp_builtin_type'" issue.
> bootstrapped and regtested in trunk revision 160890.

OK.

Patch

Index: c-family/c-cppbuiltin.c
===================================================================
--- c-family/c-cppbuiltin.c	(revision 160890)
+++ c-family/c-cppbuiltin.c	(working copy)
@@ -1022,7 +1022,8 @@  builtin_define_with_hex_fp_value (const 
       lazy_hex_fp_values[lazy_hex_fp_value_count].fp_suffix = fp_suffix;
       lazy_hex_fp_values[lazy_hex_fp_value_count].macro = node->value.macro;
       node->flags |= NODE_BUILTIN;
-      node->value.builtin = BT_FIRST_USER + lazy_hex_fp_value_count;
+      node->value.builtin
+	= (enum cpp_builtin_type) (BT_FIRST_USER + lazy_hex_fp_value_count);
       lazy_hex_fp_value_count++;
       return;
     }