about summary refs log tree commit diff stats
path: root/030container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-02-15 12:25:13 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-02-15 12:25:13 -0800
commitc36eb25ca3ac555ba7c27796e0ba84a7de696be4 (patch)
tree555bb044433910fd3e61dac697e791a9dd9ce6bf /030container.cc
parent5ba1c3b9e101b31fc38dae1701b62c373d5ef6f7 (diff)
downloadmu-c36eb25ca3ac555ba7c27796e0ba84a7de696be4.tar.gz
2658 - warn when containers contain arrays
The rule is: a container type's size must be fixed. Arrays can violate
this rule if the array length isn't included in the type. But we haven't
been warning about this, and 'new' has been silently turning array
elements to be empty.
Diffstat (limited to '030container.cc')
-rw-r--r--030container.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/030container.cc b/030container.cc
index 07e9718e..43d518e8 100644
--- a/030container.cc
+++ b/030container.cc
@@ -436,6 +436,7 @@ void insert_container(const string& command, kind_of_type kind, istream& in) {
     info.elements.push_back(new_type_tree_with_new_types_for_unknown(info.element_type_names.back(), info));
     for (long long int i = 0; i < SIZE(info.elements); ++i)
       trace(9993, "parse") << "  type: " << info.elements.at(i)->value << end();
+    // End Load Container Element Definition
   }
   assert(SIZE(info.elements) == SIZE(info.element_names));
   info.size = SIZE(info.elements);