+2000-06-16 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * defs.h: define language_pascal in language enumeration.
+ * language.h: define _LANG_pascal macro.
+ * language.c: add language_pascal support in all language dependant
+ functions.
+
Sun Jun 18 01:01:09 2000 Andrew Cagney <cagney@b1.cygnus.com>
* mips-tdep.c (mips_debug): New variable.
language_fortran, /* Fortran */
language_m2, /* Modula-2 */
language_asm, /* Assembly language */
- language_scm /* Scheme / Guile */
+ language_scm, /* Scheme / Guile */
+ language_pascal /* Pascal */
};
enum precision_type
return (TYPE_CODE (type) != TYPE_CODE_INT) &&
(TYPE_CODE (type) != TYPE_CODE_ENUM) ? 0 : 1;
case language_m2:
+ case language_pascal:
return TYPE_CODE (type) != TYPE_CODE_INT ? 0 : 1;
case language_chill:
error ("Missing Chill support in function integral_type."); /*FIXME */
{
case language_chill:
case language_m2:
+ case language_pascal:
return TYPE_CODE (type) != TYPE_CODE_CHAR ? 0 : 1;
case language_c:
{
case language_chill:
case language_m2:
+ case language_pascal:
return TYPE_CODE (type) != TYPE_CODE_STRING ? 0 : 1;
case language_c:
return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
(TYPE_CODE (type) == TYPE_CODE_UNION) ||
(TYPE_CODE (type) == TYPE_CODE_ARRAY);
+ case language_pascal:
+ return (TYPE_CODE(type) == TYPE_CODE_STRUCT) ||
+ (TYPE_CODE(type) == TYPE_CODE_UNION) ||
+ (TYPE_CODE(type) == TYPE_CODE_SET) ||
+ (TYPE_CODE(type) == TYPE_CODE_ARRAY);
case language_m2:
return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
(TYPE_CODE (type) == TYPE_CODE_SET) ||
}
return builtin_type_f_logical_s2;
case language_cplus:
- sym = lookup_symbol ("bool", NULL, VAR_NAMESPACE, NULL, NULL);
+ case language_pascal:
+ if (current_language->la_language==language_cplus)
+ {sym = lookup_symbol ("bool", NULL, VAR_NAMESPACE, NULL, NULL);}
+ else
+ {sym = lookup_symbol ("boolean", NULL, VAR_NAMESPACE, NULL, NULL);}
if (sym)
{
type = SYMBOL_TYPE (sym);
}
#endif
+#ifdef _LANG_pascal
+ case language_pascal:
+ switch(op)
+ {
+ case BINOP_DIV:
+ if (!float_type(t1) && !float_type(t2))
+ type_op_error ("Arguments to %s must be floating point numbers.",op);
+ break;
+ case BINOP_INTDIV:
+ if (!integral_type(t1) || !integral_type(t2))
+ type_op_error ("Arguments to %s must be of integral type.",op);
+ break;
+ }
+#endif
+
#ifdef _LANG_chill
case language_chill:
error ("Missing Chill support in function binop_type_check."); /*FIXME */