about summary refs log tree commit diff stats
path: root/034exclusive_container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-26 15:48:35 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-26 15:48:35 -0700
commitafa42503cdae82c535208d51bec8d4f9a920f6f0 (patch)
tree2db25e3ccdbd40262ecd9e7767bbfa5bbe5f7d91 /034exclusive_container.cc
parentc8a58cdc8cc3353de3a42a9f53e5c4759ef9701a (diff)
downloadmu-afa42503cdae82c535208d51bec8d4f9a920f6f0.tar.gz
1474 - another warning
Diffstat (limited to '034exclusive_container.cc')
-rw-r--r--034exclusive_container.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/034exclusive_container.cc b/034exclusive_container.cc
index 6d8e3932..8247cb42 100644
--- a/034exclusive_container.cc
+++ b/034exclusive_container.cc
@@ -25,13 +25,16 @@ Type[tmp].element_names.push_back("i");
 Type[tmp].element_names.push_back("p");
 }
 
+//: Tests in this layer often explicitly setup memory before reading it as an
+//: array. Don't do this in general. I'm tagging exceptions with /raw to
+//: avoid warnings.
 :(scenario copy_exclusive_container)
 # Copying exclusive containers copies all their contents and an extra location for the tag.
 recipe main [
   1:number <- copy 1:literal  # 'point' variant
   2:number <- copy 34:literal
   3:number <- copy 35:literal
-  4:number-or-point <- copy 1:number-or-point
+  4:number-or-point <- copy 1:number-or-point/raw  # unsafe
 ]
 +mem: storing 1 in location 4
 +mem: storing 34 in location 5
@@ -69,7 +72,7 @@ recipe main [
   12:number <- copy 1:literal
   13:number <- copy 35:literal
   14:number <- copy 36:literal
-  20:address:point <- maybe-convert 12:number-or-point, 1:variant
+  20:address:point <- maybe-convert 12:number-or-point/raw, 1:variant  # unsafe
 ]
 +mem: storing 13 in location 20
 
@@ -78,7 +81,7 @@ recipe main [
   12:number <- copy 1:literal
   13:number <- copy 35:literal
   14:number <- copy 36:literal
-  20:address:point <- maybe-convert 12:number-or-point, 0:variant
+  20:address:point <- maybe-convert 12:number-or-point/raw, 0:variant  # unsafe
 ]
 +mem: storing 0 in location 20