From ac815a61189333094fc96f982fb0e7e1a510ff4e Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sun, 9 Jan 2022 19:37:46 +0100 Subject: [PATCH] netstruct_t: Set line info netstruct_t inherits from LineInfo. But the file and line information is never set leading to messages like :0: error: Member r of packed struct/union must be packed. When elaborating a netstruct_t set the line info from the struct_type_t it is elaborated from. This makes sure that error messages for the struct type have the proper file and line information when printed. Signed-off-by: Lars-Peter Clausen --- elab_type.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elab_type.cc b/elab_type.cc index 62f28bbd7..e01b520ba 100644 --- a/elab_type.cc +++ b/elab_type.cc @@ -179,6 +179,8 @@ netstruct_t* struct_type_t::elaborate_type_raw(Design*des, NetScope*scope) const { netstruct_t*res = new netstruct_t; + res->set_line(*this); + res->packed(packed_flag); res->set_signed(signed_flag);