[m-dev.] trivial diff: add `volatile' to runtime/mercury_dummy.{c,h}
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Dec 21 21:13:21 AEDT 1999
Estimated hours taken: 0.25
runtime/mercury_dummy.h:
runtime/mercury_dummy.c:
Declare global_pointer and global_pointer_2 as `volatile'.
These variables are dummy variables used to suppress optimization,
and for that purpose it's safest to declare them as volatile.
Workspace: /d-drive/home/hg/fjh/mercury
Index: runtime/mercury_dummy.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_dummy.c,v
retrieving revision 1.4
diff -u -d -r1.4 mercury_dummy.c
--- runtime/mercury_dummy.c 1999/10/20 14:35:26 1.4
+++ runtime/mercury_dummy.c 1999/12/06 13:57:12
@@ -12,8 +12,8 @@
** that gcc can't inline it. Similarly for the two pointers.
*/
-void *global_pointer;
-void *global_pointer_2;
+void *volatile global_pointer;
+void *volatile global_pointer_2;
void
dummy_function_call(void)
Index: runtime/mercury_dummy.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_dummy.h,v
retrieving revision 1.3
diff -u -d -r1.3 mercury_dummy.h
--- runtime/mercury_dummy.h 1999/10/20 14:35:27 1.3
+++ runtime/mercury_dummy.h 1999/12/06 13:56:34
@@ -17,7 +17,7 @@
extern void dummy_function_call(void);
extern void *dummy_identify_function(void *);
-extern void *global_pointer;
-extern void *global_pointer_2;
+extern void *volatile global_pointer;
+extern void *volatile global_pointer_2;
#endif /* not MERCURY_DUMMY_H */
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list