and parameters that are functions).
+Tue Nov 12 13:43:26 1991 Per Bothner (bothner at cygnus.com)
+
+ * symtab.c (decode_line_1): Remove spurious call to operator_chars.
+
+ Allow setting breakpoints on C++ destructors.
+ * valops.c (destructor_name_p): Don't check TYPE_HAS_DESTRUCTOR,
+ since it lies. Rely on callers to catch missing destructors.
+ * symtab.c (decode_line_1): For example (see above), here.
+ * buildsym.c, symtab.h: Remove TYPE_FLAGS_HAS{CON,DE}STRUCTOR
+ flags since they are no longer used.
+
+ Fixes to support C++ methods with functional parameters.
+ * c-exp.y (func_mod rule): Allow (and ignore) list of parameter
+ types in a function type.
+ * eval.c (parse_and_eval_type), value.h: New function,
+ parse_and_eval_type, is based on old code from check_stub_method.
+ But don't actually evaluate the cast, since that calls
+ value_cast(), whcih may fail. Just extract the type
+ from the parsed expression.
+ * values.c (check_stub_method): While looping through the
+ arguments, adjust depth *after* parameter has been handled.
+ Replace call and setup of parse_and_eval with new function
+ parse_and_eval_type.
+
Tue Nov 12 09:40:07 1991 Fred Fish (fnf at cygnus.com)
* utils.c, rem-multi.shar: Remove fixed arg count version of
{
*pp += 1;
- if (**pp == '=')
+ if (**pp == '=' || **pp == '+' || **pp == '-')
{
- TYPE_FLAGS (type)
- |= TYPE_FLAG_HAS_CONSTRUCTOR | TYPE_FLAG_HAS_DESTRUCTOR;
- *pp += 1;
- }
- else if (**pp == '+')
- {
- TYPE_FLAGS (type) |= TYPE_FLAG_HAS_CONSTRUCTOR;
- *pp += 1;
- }
- else if (**pp == '-')
- {
- TYPE_FLAGS (type) |= TYPE_FLAG_HAS_DESTRUCTOR;
+ /* Obsolete flags that used to indicate the presence
+ of constructors and/or destructors. */
*pp += 1;
}
func_mod: '(' ')'
{ $$ = 0; }
+ | '(' nonempty_typelist ')'
+ { free ($2); $$ = 0; }
;
type : ptype
return (struct partial_symbol *) 0;
}
+/* Find the psymtab containing main(). */
+
+struct partial_symtab *
+find_main_psymtab ()
+{
+ register struct partial_symtab *pst;
+ for (pst = partial_symtab_list; pst; pst = pst->next)
+ if (lookup_partial_symbol (pst, "main", 1, VAR_NAMESPACE))
+ return pst;
+ return NULL;
+}
+
/* Look for a symbol in block BLOCK. */
struct symbol *
}
while (p[0] == ' ' || p[0] == '\t') p++;
- q = operator_chars (*argptr, &q1);
if (p[0] == ':')
{
}
else
tmp = copy;
- error ("that class does not have any method named %s", tmp);
+ if (tmp[0] == '~')
+ error ("The class `%s' does not have destructor defined",
+ sym_class->name);
+ else
+ error ("The class %s does not have any method named %s",
+ sym_class->name, tmp);
}
}
else
if (*p != ')') /* () means no args, skip while */
{
+ depth = 0;
while (*p)
{
- if (*p == '(')
- depth += 1;
- else if (*p == ')')
- depth -= 1;
-
if (depth <= 0 && (*p == ',' || *p == ')'))
{
- char *tmp = (char *)alloca (p - argtypetext + 4);
- value val;
- tmp[0] = '(';
- bcopy (argtypetext, tmp+1, p - argtypetext);
- tmp[p-argtypetext+1] = ')';
- tmp[p-argtypetext+2] = '0';
- tmp[p-argtypetext+3] = '\0';
- val = parse_and_eval (tmp);
- argtypes[argcount] = VALUE_TYPE (val);
+ argtypes[argcount] =
+ parse_and_eval_type (argtypetext, p - argtypetext);
argcount += 1;
argtypetext = p + 1;
}
+
+ if (*p == '(')
+ depth += 1;
+ else if (*p == ')')
+ depth -= 1;
+
p += 1;
}
}