summaryrefslogtreecommitdiffstats
path: root/byterun/memory.h
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2004-05-17 17:10:00 +0000
committerDamien Doligez <damien.doligez-inria.fr>2004-05-17 17:10:00 +0000
commitdb3745919bb07ffcc61c0b04dfd959af4503523b (patch)
treef6593c355ac0be6daa8a1d1d99548a747300db5f /byterun/memory.h
parent93ff0675a75f35c0ddc91da0ff7383550533def2 (diff)
suppression des warnings "unused variable" de gcc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6299 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/memory.h')
-rw-r--r--byterun/memory.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/byterun/memory.h b/byterun/memory.h
index 4be908b8c..172af5e8c 100644
--- a/byterun/memory.h
+++ b/byterun/memory.h
@@ -168,9 +168,15 @@ CAMLextern struct caml__roots_block *caml_local_roots; /* defined in roots.c */
CAMLxparamN (x, (size))
+#if defined (__GNUC__)
+ #define CAMLunused __attribute__ ((unused))
+#else
+ #define CAMLunused
+#endif
+
#define CAMLxparam1(x) \
struct caml__roots_block caml__roots_##x; \
- int caml__dummy_##x = ( \
+ CAMLunused int caml__dummy_##x = ( \
(caml__roots_##x.next = caml_local_roots), \
(caml_local_roots = &caml__roots_##x), \
(caml__roots_##x.nitems = 1), \
@@ -180,7 +186,7 @@ CAMLextern struct caml__roots_block *caml_local_roots; /* defined in roots.c */
#define CAMLxparam2(x, y) \
struct caml__roots_block caml__roots_##x; \
- int caml__dummy_##x = ( \
+ CAMLunused int caml__dummy_##x = ( \
(caml__roots_##x.next = caml_local_roots), \
(caml_local_roots = &caml__roots_##x), \
(caml__roots_##x.nitems = 1), \
@@ -191,7 +197,7 @@ CAMLextern struct caml__roots_block *caml_local_roots; /* defined in roots.c */
#define CAMLxparam3(x, y, z) \
struct caml__roots_block caml__roots_##x; \
- int caml__dummy_##x = ( \
+ CAMLunused int caml__dummy_##x = ( \
(caml__roots_##x.next = caml_local_roots), \
(caml_local_roots = &caml__roots_##x), \
(caml__roots_##x.nitems = 1), \
@@ -203,7 +209,7 @@ CAMLextern struct caml__roots_block *caml_local_roots; /* defined in roots.c */
#define CAMLxparam4(x, y, z, t) \
struct caml__roots_block caml__roots_##x; \
- int caml__dummy_##x = ( \
+ CAMLunused int caml__dummy_##x = ( \
(caml__roots_##x.next = caml_local_roots), \
(caml_local_roots = &caml__roots_##x), \
(caml__roots_##x.nitems = 1), \
@@ -216,7 +222,7 @@ CAMLextern struct caml__roots_block *caml_local_roots; /* defined in roots.c */
#define CAMLxparam5(x, y, z, t, u) \
struct caml__roots_block caml__roots_##x; \
- int caml__dummy_##x = ( \
+ CAMLunused int caml__dummy_##x = ( \
(caml__roots_##x.next = caml_local_roots), \
(caml_local_roots = &caml__roots_##x), \
(caml__roots_##x.nitems = 1), \
@@ -230,7 +236,7 @@ CAMLextern struct caml__roots_block *caml_local_roots; /* defined in roots.c */
#define CAMLxparamN(x, size) \
struct caml__roots_block caml__roots_##x; \
- int caml__dummy_##x = ( \
+ CAMLunused int caml__dummy_##x = ( \
(caml__roots_##x.next = caml_local_roots), \
(caml_local_roots = &caml__roots_##x), \
(caml__roots_##x.nitems = (size)), \
@@ -273,6 +279,9 @@ CAMLextern struct caml__roots_block *caml_local_roots; /* defined in roots.c */
return (result); \
}while(0)
+#define CAMLnoreturn ((void) caml__frame)
+
+
/* convenience macro */
#define Store_field(block, offset, val) do{ \
mlsize_t caml__temp_offset = (offset); \