mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 02:24:46 +08:00
* 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.
This commit is contained in:
parent
919e40930f
commit
750ba3824f
@ -1,3 +1,10 @@
|
||||
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.
|
||||
|
@ -196,7 +196,8 @@ enum language
|
||||
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
|
||||
|
@ -814,6 +814,7 @@ integral_type (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 */
|
||||
@ -849,6 +850,7 @@ character_type (type)
|
||||
{
|
||||
case language_chill:
|
||||
case language_m2:
|
||||
case language_pascal:
|
||||
return TYPE_CODE (type) != TYPE_CODE_CHAR ? 0 : 1;
|
||||
|
||||
case language_c:
|
||||
@ -871,6 +873,7 @@ string_type (type)
|
||||
{
|
||||
case language_chill:
|
||||
case language_m2:
|
||||
case language_pascal:
|
||||
return TYPE_CODE (type) != TYPE_CODE_STRING ? 0 : 1;
|
||||
|
||||
case language_c:
|
||||
@ -935,6 +938,11 @@ structured_type (type)
|
||||
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) ||
|
||||
@ -966,7 +974,11 @@ lang_bool_type ()
|
||||
}
|
||||
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);
|
||||
@ -1160,6 +1172,21 @@ binop_type_check (arg1, arg2, op)
|
||||
}
|
||||
#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 */
|
||||
|
@ -35,7 +35,8 @@ struct expression;
|
||||
#define _LANG_c
|
||||
#define _LANG_m2
|
||||
#define _LANG_chill
|
||||
#define _LANG_fortran
|
||||
#define _LANG_fortran
|
||||
#define _LANG_pascal
|
||||
|
||||
#define MAX_FORTRAN_DIMS 7 /* Maximum number of F77 array dims */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user