* config/arm/symbian.h (CC1_SPEC): Add -fno-short-enums.
(CC1PLUS_SPEC): Define it to be the same as CC1_SPEC.
* gcc.dg/enum2.c: New test.
* gcc.dg/symbian3.c: Likewise.
* gcc.dg/symbian4.c: Likewise.
* gcc.dg/wchar_t-2.c: Likewise.
From-SVN: r85632
+2004-08-06 Mark Mitchell <mark@codesourcery.com>
+
+ * config/arm/symbian.h (CC1_SPEC): Add -fno-short-enums.
+ (CC1PLUS_SPEC): Define it to be the same as CC1_SPEC.
+
2004-08-06 Roman Zippel <zippel@linux-m68k.org>
* config/m68k/m68k.c (post_inc_operand,pre_dec_operand): New.
Make all symbols hidden by default. Symbian OS expects that all
exported symbols will be explicitly marked with
"__declspec(dllexport)". */
-#define CC1_SPEC "-fno-builtin -fvisibility=hidden"
-#define CC1PLUS_SPEC "-fno-builtin -fvisibility=hidden"
+#define CC1_SPEC "-fno-builtin -fvisibility=hidden -fno-short-enums"
+#define CC1PLUS_SPEC CC1_SPEC
/* Symbian OS does not use crt0.o, unlike the generic unknown-elf
configuration. */
+2004-08-06 Mark Mitchell <mark@codesourcery.com>
+
+ * gcc.dg/enum2.c: New test.
+ * gcc.dg/symbian3.c: Likewise.
+ * gcc.dg/symbian4.c: Likewise.
+ * gcc.dg/wchar_t-2.c: Likewise.
+
2004-08-05 Mark Mitchell <mark@codesourcery.com>
* g++.dg/ext/visibility/visibility-8.C: Add constructor and
--- /dev/null
+/* { dg-options "-fshort-enums" } */
+/* Check that "-fshort-enums" packs enumeration tyes into a minimal
+ number of bytes.. */
+
+enum e { e_1 };
+
+extern int i[sizeof (enum e)];
+int i[1];
--- /dev/null
+/* { dg-do compile { target arm*-*-symbianelf* } } */
+/* Check that enumeration types are 4-byte types. */
+
+enum e { e_1 };
+
+extern int i[sizeof (enum e)];
+int i[4];
--- /dev/null
+/* { dg-do compile { target arm*-*-symbianelf* } } */
+/* Check that wchar_t is a 4-byte type. */
+
+extern int i[sizeof (L'a')];
+int i[4];
--- /dev/null
+/* { dg-options "-fshort-wchar" } */
+/* Check that "-fshort-wchar" makes wchar_t the same size as "unsigned
+ short". /
+
+extern int i[sizeof (L'a')];
+int i[sizeof (unsigned short)];