daily update
[deliverable/binutils-gdb.git] / gdb / parse.c
index 897002d91154aa34b0cf04161a6e36c72701c083..d1ed4e88c84b0f2278a2c1869fa6ccc859d0c5ae 100644 (file)
@@ -90,7 +90,7 @@ int in_parse_field;
    field name.  It is -1 if no dereference operation was found.  */
 static int expout_last_struct = -1;
 \f
-static int expressiondebug = 0;
+static unsigned int expressiondebug = 0;
 static void
 show_expressiondebug (struct ui_file *file, int from_tty,
                      struct cmd_list_element *c, const char *value)
@@ -910,10 +910,16 @@ operator_length_standard (const struct expression *expr, int endpos,
       oplen = 3;
       break;
 
-    case BINOP_VAL:
-    case UNOP_CAST:
+    case UNOP_CAST_TYPE:
     case UNOP_DYNAMIC_CAST:
     case UNOP_REINTERPRET_CAST:
+    case UNOP_MEMVAL_TYPE:
+      oplen = 1;
+      args = 2;
+      break;
+
+    case BINOP_VAL:
+    case UNOP_CAST:
     case UNOP_MEMVAL:
       oplen = 3;
       args = 1;
@@ -932,6 +938,8 @@ operator_length_standard (const struct expression *expr, int endpos,
     case UNOP_ODD:
     case UNOP_ORD:
     case UNOP_TRUNC:
+    case OP_TYPEOF:
+    case OP_DECLTYPE:
       oplen = 1;
       args = 1;
       break;
@@ -1555,7 +1563,8 @@ type_stack_cleanup (void *arg)
 }
 
 /* Push a function type with arguments onto the global type stack.
-   LIST holds the argument types.  */
+   LIST holds the argument types.  If the final item in LIST is NULL,
+   then the function will be varargs.  */
 
 void
 push_typelist (VEC (type_ptr) *list)
@@ -1731,8 +1740,6 @@ operator_check_standard (struct expression *exp, int pos,
     case OP_SCOPE:
     case OP_TYPE:
     case UNOP_CAST:
-    case UNOP_DYNAMIC_CAST:
-    case UNOP_REINTERPRET_CAST:
     case UNOP_MAX:
     case UNOP_MEMVAL:
     case UNOP_MIN:
@@ -1852,15 +1859,15 @@ _initialize_parse (void)
   type_stack.depth = 0;
   type_stack.elements = NULL;
 
-  add_setshow_zinteger_cmd ("expression", class_maintenance,
-                           &expressiondebug,
-                           _("Set expression debugging."),
-                           _("Show expression debugging."),
-                           _("When non-zero, the internal representation "
-                             "of expressions will be printed."),
-                           NULL,
-                           show_expressiondebug,
-                           &setdebuglist, &showdebuglist);
+  add_setshow_zuinteger_cmd ("expression", class_maintenance,
+                            &expressiondebug,
+                            _("Set expression debugging."),
+                            _("Show expression debugging."),
+                            _("When non-zero, the internal representation "
+                              "of expressions will be printed."),
+                            NULL,
+                            show_expressiondebug,
+                            &setdebuglist, &showdebuglist);
   add_setshow_boolean_cmd ("parser", class_maintenance,
                            &parser_debug,
                           _("Set parser debugging."),
This page took 0.025085 seconds and 4 git commands to generate.