+#include <stdlib.h>
+
+#ifdef PROTOTYPES
+int main (int argc, char **argv, char **envp)
+#else
main (argc, argv, envp)
int argc;
char **argv;
char **envp;
+#endif
{
extern void dummy();
+#ifdef usestubs
+ set_debug_traps();
+ breakpoint();
+#endif
dummy();
+ return 0;
}
/* We put main() right up front so its line number doesn't keep changing. */
enum colors {red, green, blue} color;
enum cars {chevy, ford, porsche} clunker;
-void dummy()
+/**** Enumeration bitfields, supported by GNU C *******/
+
+#ifdef __GNUC__
+enum senum {sm1 = -1, s1 = 1};
+struct senum_field {enum senum field:2; } sef;
+enum uenum {u1 = 1, u2 = 2};
+struct uenum_field {enum uenum field:2; } uef;
+#endif
+
+void
+dummy ()
{
+ /* setvar.exp wants to allocate memory for constants. So make sure malloc
+ gets linked into the program. */
+ malloc (1);
+
/* Some linkers (e.g. on AIX) remove unreferenced variables,
so make sure to reference them. */
v_char = 0;
v_struct2.v_int_member = v_struct1.v_int_member;
v_union2.v_short_member = v_union.v_short_member;
+
+#ifdef __GNUC__
+ sef.field = s1;
+ uef.field = u1;
+#endif
}