This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Remove DEFAULT_SHORT_ENUMS.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 19 Feb 2004 13:48:39 -0500 (EST)
- Subject: [patch] Remove DEFAULT_SHORT_ENUMS.
Hi,
Attached is a patch to remove DEFAULT_SHORT_ENUMS as nobody defines
it.
Bootstrapped on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2004-02-19 Kazu Hirata <kazu@cs.umass.edu>
* opts.c (decode_options): Don't use DEFAULT_SHORT_ENUMS.
* system.h (DEFAULT_SHORT_ENUMS): Poison.
* config/cris/cris.h: Remove a comment about
DEFAULT_SHORT_ENUMS.
* config/ip2k/ip2k.h: Likewise.
* doc/tm.texi (DEFAULT_SHORT_ENUMS): Remove.
Index: opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opts.c,v
retrieving revision 1.55
diff -u -r1.55 opts.c
--- opts.c 17 Feb 2004 18:32:34 -0000 1.55
+++ opts.c 18 Feb 2004 18:18:16 -0000
@@ -594,10 +594,6 @@
/* Initialize whether `char' is signed. */
flag_signed_char = DEFAULT_SIGNED_CHAR;
-#ifdef DEFAULT_SHORT_ENUMS
- /* Initialize how much space enums occupy, by default. */
- flag_short_enums = DEFAULT_SHORT_ENUMS;
-#endif
/* Initialize target_flags before OPTIMIZATION_OPTIONS so the latter can
modify it. */
Index: system.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/system.h,v
retrieving revision 1.197
diff -u -r1.197 system.h
--- system.h 8 Feb 2004 02:13:28 -0000 1.197
+++ system.h 18 Feb 2004 18:18:17 -0000
@@ -636,7 +636,8 @@
PROMOTED_MODE EXPAND_BUILTIN_VA_END \
LINKER_DOES_NOT_WORK_WITH_DWARF2 FUNCTION_ARG_KEEP_AS_REFERENCE \
GIV_SORT_CRITERION MAX_LONG_TYPE_SIZE MAX_LONG_DOUBLE_TYPE_SIZE \
- MAX_WCHAR_TYPE_SIZE GCOV_TYPE_SIZE SHARED_SECTION_ASM_OP
+ MAX_WCHAR_TYPE_SIZE GCOV_TYPE_SIZE SHARED_SECTION_ASM_OP \
+ DEFAULT_SHORT_ENUMS
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \
Index: config/cris/cris.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/cris/cris.h,v
retrieving revision 1.65
diff -u -r1.65 cris.h
--- config/cris/cris.h 6 Feb 2004 06:18:26 -0000 1.65
+++ config/cris/cris.h 18 Feb 2004 18:18:19 -0000
@@ -567,8 +567,6 @@
/* For compatibility and historical reasons, a char should be signed. */
#define DEFAULT_SIGNED_CHAR 1
-/* No DEFAULT_SHORT_ENUMS, please. */
-
/* Note that WCHAR_TYPE_SIZE is used in cexp.y,
where TARGET_SHORT is not available. */
#undef WCHAR_TYPE
Index: config/ip2k/ip2k.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ip2k/ip2k.h,v
retrieving revision 1.35
diff -u -r1.35 ip2k.h
--- config/ip2k/ip2k.h 7 Feb 2004 17:06:20 -0000 1.35
+++ config/ip2k/ip2k.h 18 Feb 2004 18:18:20 -0000
@@ -108,12 +108,6 @@
#define DEFAULT_SIGNED_CHAR 1
-/* #define DEFAULT_SHORT_ENUMS 1
- This was the default for the IP2k but gcc has a bug (as of 17th May
- 2001) in the way that library calls to the memory checker functions
- are issues that screws things up if an enum is not equivalent to
- an int. */
-
#define SIZE_TYPE "unsigned int"
#define PTRDIFF_TYPE "int"
Index: doc/tm.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/tm.texi,v
retrieving revision 1.297
diff -u -r1.297 tm.texi
--- doc/tm.texi 8 Feb 2004 23:08:48 -0000 1.297
+++ doc/tm.texi 18 Feb 2004 18:18:27 -0000
@@ -1593,15 +1593,6 @@
and @option{-funsigned-char}.
@end defmac
-@defmac DEFAULT_SHORT_ENUMS
-A C expression to determine whether to give an @code{enum} type
-only as many bytes as it takes to represent the range of possible values
-of that type. A nonzero value means to do that; a zero value means all
-@code{enum} types should be allocated like @code{int}.
-
-If you don't define the macro, the default is 0.
-@end defmac
-
@defmac SIZE_TYPE
A C expression for a string describing the name of the data type to use
for size values. The typedef name @code{size_t} is defined using the