This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
two minor libmudflap fixes
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 14 Jun 2005 14:36:44 -0400
- Subject: two minor libmudflap fixes
Hi -
2005-06-14 Frank Ch. Eigler <fche@redhat.com>
PR mudflap/22064
* mf-impl.h (mudflap_mode, violation_mode): Make these ordinary
unsigned vars with #defines instead of enums.
2005-06-14 Frank Ch. Eigler <fche@redhat.com>
PR libmudflap/21094
* testsuite/libmudflap.c++/*.exp: Assert build tree g++.
Index: mf-impl.h
===================================================================
RCS file: /cvs/gcc/gcc/libmudflap/mf-impl.h,v
retrieving revision 1.6
diff -u -w -s -p -r1.6 mf-impl.h
--- mf-impl.h 22 Mar 2005 02:14:32 -0000 1.6
+++ mf-impl.h 14 Jun 2005 18:32:14 -0000
@@ -167,24 +167,18 @@ struct __mf_options
#endif
/* Major operation mode */
- enum
- {
- mode_nop, /* mudflaps do nothing */
- mode_populate, /* mudflaps populate tree but do not check for violations
*/
- mode_check, /* mudflaps populate and check for violations (normal) */
- mode_violate /* mudflaps trigger a violation on every call (diagnostic) */
- }
- mudflap_mode;
+#define mode_nop 0 /* Do nothing. */
+#define mode_populate 1 /* Populate tree but do not check for violations. */
+#define mode_check 2 /* Populate and check for violations (normal). */
+#define mode_violate 3 /* Trigger a violation on every call (diagnostic). */
+ unsigned mudflap_mode;
/* How to handle a violation. */
- enum
- {
- viol_nop, /* Return control to application. */
- viol_segv, /* Signal self with segv. */
- viol_abort, /* Call abort (). */
- viol_gdb /* Fork a debugger on self */
- }
- violation_mode;
+#define viol_nop 0 /* Return control to application. */
+#define viol_segv 1 /* Signal self with segv. */
+#define viol_abort 2 /* Call abort (). */
+#define viol_gdb 3 /* Fork a debugger on self */
+ unsigned violation_mode;
/* Violation heuristics selection. */
unsigned heur_stack_bound; /* allow current stack region */
Index: testsuite/libmudflap.c++/c++frags.exp
===================================================================
RCS file: /cvs/gcc/gcc/libmudflap/testsuite/libmudflap.c++/c++frags.exp,v
retrieving revision 1.6
diff -u -w -s -p -r1.6 c++frags.exp
--- testsuite/libmudflap.c++/c++frags.exp 12 Apr 2005 18:09:08 -0000
1.6
+++ testsuite/libmudflap.c++/c++frags.exp 14 Jun 2005 18:32:14 -0000
@@ -1,5 +1,9 @@
libmudflap-init c++
+if {$cxx == "g++"} then {
+ unsupported "g++ not found"
+ return
+}
dg-init
Index: testsuite/libmudflap.c++/ctors.exp
===================================================================
RCS file: /cvs/gcc/gcc/libmudflap/testsuite/libmudflap.c++/ctors.exp,v
retrieving revision 1.2
diff -u -w -s -p -r1.2 ctors.exp
--- testsuite/libmudflap.c++/ctors.exp 13 Oct 2004 18:27:16 -0000 1.2
+++ testsuite/libmudflap.c++/ctors.exp 14 Jun 2005 18:32:14 -0000
@@ -1,5 +1,9 @@
libmudflap-init c++
+if {$cxx == "g++"} then {
+ unsupported "g++ not found"
+ return
+}