summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gen.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gen.rs b/src/gen.rs
index e50cddea..e23a929f 100644
--- a/src/gen.rs
+++ b/src/gen.rs
@@ -469,6 +469,14 @@ fn gen_globals(mut ctx: &mut GenCtx,
}
if let Some(substituted) = ctx.current_module().translations.get(&g.name()) {
+ match (substituted.layout(), g.layout()) {
+ (Some(l), Some(lg)) if l.size != lg.size => {},
+ (None, None) => {},
+ _ => {
+ // XXX real logger
+ println!("warning: substituted type for {} does not match its size", g.name());
+ }
+ }
g = substituted.clone();
}