summaryrefslogtreecommitdiff
path: root/cross/h8300-hms-gcc/patches/patch-ab
blob: 5c5ecf9d83e32cbd62fe7bf3f3de7ee210f0ea18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
$NetBSD: patch-ab,v 1.2 2010/02/14 21:30:51 dholland Exp $

Patch out illegal C constructs.

--- ../gcc-3.1/gcc/cp/decl.c~	2002-05-03 18:55:23.000000000 +0000
+++ ../gcc-3.1/gcc/cp/decl.c
@@ -458,6 +458,11 @@ struct binding_level
    ? cp_function_chain->bindings		\
    : scope_chain->bindings)
 
+#define current_binding_level__LVALUE		\
+  (*(cfun && cp_function_chain->bindings	\
+   ? &cp_function_chain->bindings		\
+   : &scope_chain->bindings))
+
 /* The binding level of the current class, if any.  */
 
 #define class_binding_level scope_chain->class_bindings
@@ -507,7 +512,7 @@ push_binding_level (newlevel, tag_transp
      are active.  */
   memset ((char*) newlevel, 0, sizeof (struct binding_level));
   newlevel->level_chain = current_binding_level;
-  current_binding_level = newlevel;
+  current_binding_level__LVALUE = newlevel;
   newlevel->tag_transparent = tag_transparent;
   newlevel->more_cleanups_ok = 1;
 
@@ -563,7 +568,7 @@ pop_binding_level ()
 #endif /* defined(DEBUG_CP_BINDING_LEVELS) */
   {
     register struct binding_level *level = current_binding_level;
-    current_binding_level = current_binding_level->level_chain;
+    current_binding_level__LVALUE = current_binding_level->level_chain;
     level->level_chain = free_binding_level;
 #if 0 /* defined(DEBUG_CP_BINDING_LEVELS) */
     if (level->binding_depth != binding_depth)
@@ -578,7 +583,7 @@ static void
 suspend_binding_level ()
 {
   if (class_binding_level)
-    current_binding_level = class_binding_level;
+    current_binding_level__LVALUE = class_binding_level;
 
   if (global_binding_level)
     {
@@ -600,7 +605,7 @@ suspend_binding_level ()
     }
   is_class_level = 0;
 #endif /* defined(DEBUG_CP_BINDING_LEVELS) */
-  current_binding_level = current_binding_level->level_chain;
+  current_binding_level__LVALUE = current_binding_level->level_chain;
   find_class_binding_level ();
 }
 
@@ -613,7 +618,7 @@ resume_binding_level (b)
   my_friendly_assert(!class_binding_level, 386);
   /* Also, resuming a non-directly nested namespace is a no-no.  */
   my_friendly_assert(b->level_chain == current_binding_level, 386);
-  current_binding_level = b;
+  current_binding_level__LVALUE = b;
 #if defined(DEBUG_CP_BINDING_LEVELS)
   b->binding_depth = binding_depth;
   indent ();
@@ -4292,9 +4297,9 @@ pushdecl_with_scope (x, level)
   else
     {
       b = current_binding_level;
-      current_binding_level = level;
+      current_binding_level__LVALUE = level;
       x = pushdecl (x);
-      current_binding_level = b;
+      current_binding_level__LVALUE = b;
     }
   current_function_decl = function_decl;
   return x;
@@ -6515,7 +6520,7 @@ cxx_init_decl_processing ()
   current_lang_name = lang_name_c;
 
   current_function_decl = NULL_TREE;
-  current_binding_level = NULL_BINDING_LEVEL;
+  current_binding_level__LVALUE = NULL_BINDING_LEVEL;
   free_binding_level = NULL_BINDING_LEVEL;
 
   build_common_tree_nodes (flag_signed_char);
@@ -10080,10 +10085,10 @@ grokdeclarator (declarator, declspecs, d
   if (decl_context == NORMAL && !toplevel_bindings_p ())
     {
       struct binding_level *b = current_binding_level;
-      current_binding_level = b->level_chain;
+      current_binding_level__LVALUE = b->level_chain;
       if (current_binding_level != 0 && toplevel_bindings_p ())
 	decl_context = PARM;
-      current_binding_level = b;
+      current_binding_level__LVALUE = b;
     }
 
   if (name == NULL)
@@ -13720,7 +13725,7 @@ start_function (declspecs, declarator, a
      FIXME factor out the non-RTL stuff.  */
   bl = current_binding_level;
   init_function_start (decl1, input_filename, lineno);
-  current_binding_level = bl;
+  current_binding_level__LVALUE = bl;
 
   /* Even though we're inside a function body, we still don't want to
      call expand_expr to calculate the size of a variable-sized array.