OSDN Git Service

Use backend interface for variables.
[pf3gnuchains/gcc-fork.git] / gcc / go / go-lang.c
index 323f8c5..5132e97 100644 (file)
@@ -1,5 +1,5 @@
 /* go-lang.c -- Go frontend gcc interface.
-   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -65,7 +65,7 @@ struct GTY(()) lang_identifier
 /* The resulting tree type.  */
 
 union GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
-          chain_next ("(union lang_tree_node *) TREE_CHAIN (&%h.generic)")))
+          chain_next ("CODE_CONTAINS_STRUCT (TREE_CODE (&%h.generic), TS_COMMON) ? ((union lang_tree_node *) TREE_CHAIN (&%h.generic)) : NULL")))
 lang_tree_node
 {
   union tree_node GTY((tag ("0"),
@@ -103,7 +103,7 @@ go_langhook_init (void)
      to, e.g., unsigned_char_type_node) but before calling
      build_common_builtin_nodes (because it calls, indirectly,
      go_type_for_size).  */
-  go_create_gogo (INT_TYPE_SIZE, FLOAT_TYPE_SIZE, POINTER_SIZE);
+  go_create_gogo (INT_TYPE_SIZE, POINTER_SIZE);
 
   build_common_builtin_nodes ();
 
@@ -149,9 +149,7 @@ go_langhook_init_options_struct (struct gcc_options *opts)
 
   /* The builtin math functions should not set errno.  */
   opts->x_flag_errno_math = 0;
-
-  /* By default assume that floating point math does not trap.  */
-  opts->x_flag_trapping_math = 0;
+  opts->frontend_set_flag_errno_math = true;
 
   /* We turn on stack splitting if we can.  */
   if (targetm.supports_split_stack (false, opts))