From: Joel Brobecker Date: Wed, 5 May 2010 17:07:40 +0000 (+0000) Subject: Remove unused MAX_OF*/MIN_OF* macros. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af33db377b0860b81001f0d5552e00cb44b2474a;p=binutils-gdb.git Remove unused MAX_OF*/MIN_OF* macros. FWIW: They can no longer work either, as they depend on other macros which have been missing for quite a while. ChangeLog: * gdbtypes.h (MAX_OF_TYPE, MIN_OF_TYPE): Delete macros. * ada-lang.c: Remove comment mentioning these macros. * m2-exp.y: Delete commented out code. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b5f75b4b590..d5cf363b67f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-05-05 Joel Brobecker + + * gdbtypes.h (MAX_OF_TYPE, MIN_OF_TYPE): Delete macros. + * ada-lang.c: Remove comment mentioning these macros. + * m2-exp.y: Delete commented out code. + 2010-05-05 Joel Brobecker * sparc-tdep.c (sparc_structure_or_union_p): Return non-zero diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 7238a44bdd7..f31d0750b03 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -527,11 +527,6 @@ check_size (const struct type *type) error (_("object size is larger than varsize-limit")); } - -/* Note: would have used MAX_OF_TYPE and MIN_OF_TYPE macros from - gdbtypes.h, but some of the necessary definitions in that file - seem to have gone missing. */ - /* Maximum value of a SIZE-byte signed integer type. */ static LONGEST max_of_size (int size) diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 4d26f5a3bf7..3141857d94c 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -1185,16 +1185,6 @@ extern const struct floatformat *floatformats_vax_d[BFD_ENDIAN_UNKNOWN]; extern const struct floatformat *floatformats_ibm_long_double[BFD_ENDIAN_UNKNOWN]; -/* 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))) - -#define MIN_OF_TYPE(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 was used to allocate the space for the type structure itself. I.E. diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index 38bc7ccfa5b..3baff791ee5 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -651,22 +651,6 @@ type %% -#if 0 /* FIXME! */ -int -overflow(a,b) - long a,b; -{ - return (MAX_OF_TYPE(parse_m2_type->builtin_int) - b) < a; -} - -int -uoverflow(a,b) - unsigned long a,b; -{ - return (MAX_OF_TYPE(parse_m2_type->builtin_card) - b) < a; -} -#endif /* FIXME */ - /* Take care of parsing a number (anything that starts with a digit). Set yylval and return the token type; update lexptr. LEN is the number of characters in it. */