/* Internal type definitions for GDB.
- Copyright (C) 1992-1994, 1996, 1998-2000 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
This file is part of GDB.
/* No sign for this type. In C++, "char", "signed char", and "unsigned
char" are distinct types; so we need an extra flag to indicate the
- absence ofa sign! */
+ absence of a sign! */
#define TYPE_FLAG_NOSIGN (1 << 1)
extern struct type *builtin_type_bool;
/* Address/pointer types: */
-/* (C) Language pointer type. Some target platforms use an implicitly
- {sign,zero} -extended 32 bit C language pointer on a 64 bit ISA. */
-extern struct type *builtin_type_ptr;
+/* (C) Language `pointer to data' type. Some target platforms use an
+ implicitly {sign,zero} -extended 32 bit C language pointer on a 64
+ bit ISA. */
+extern struct type *builtin_type_void_data_ptr;
+
+/* (C) Language `pointer to function returning void' type. Since
+ ANSI, C standards have explicitly said that pointers to functions
+ and pointers to data are not interconvertible --- that is, you
+ can't cast a function pointer to void * and back, and expect to get
+ the same value. However, all function pointer types are
+ interconvertible, so void (*) () can server as a generic function
+ pointer. */
+extern struct type *builtin_type_void_func_ptr;
+
/* The target CPU's address type. This is the ISA address size. */
extern struct type *builtin_type_CORE_ADDR;
/* The symbol table address type. Some object file formats have a 32
extern struct type *builtin_type_f_character;
extern struct type *builtin_type_f_integer;
+extern struct type *builtin_type_f_integer_s2;
extern struct type *builtin_type_f_logical;
extern struct type *builtin_type_f_logical_s1;
extern struct type *builtin_type_f_logical_s2;
-extern struct type *builtin_type_f_integer;
-extern struct type *builtin_type_f_integer_s2;
extern struct type *builtin_type_f_real;
extern struct type *builtin_type_f_real_s8;
extern struct type *builtin_type_f_real_s16;
/* Maximum and minimum values of built-in types */
#define MAX_OF_TYPE(t) \
- TYPE_UNSIGNED(t) ? UMAX_OF_SIZE(TYPE_LENGTH(t)) \
- : MAX_OF_SIZE(TYPE_LENGTH(t))
+ (TYPE_UNSIGNED(t) ? UMAX_OF_SIZE(TYPE_LENGTH(t)) \
+ : MAX_OF_SIZE(TYPE_LENGTH(t)))
#define MIN_OF_TYPE(t) \
- TYPE_UNSIGNED(t) ? UMIN_OF_SIZE(TYPE_LENGTH(t)) \
- : MIN_OF_SIZE(TYPE_LENGTH(t))
+ (TYPE_UNSIGNED(t) ? UMIN_OF_SIZE(TYPE_LENGTH(t)) \
+ : MIN_OF_SIZE(TYPE_LENGTH(t)))
/* Allocate space for storing data associated with a particular type.
We ensure that the space is allocated using the same mechanism that
extern void maintenance_print_type (char *, int);
-/* typeprint.c */
-
-extern void print_type_scalar (struct type *, LONGEST, struct ui_file *);
-
#endif /* GDBTYPES_H */