Daniel Marmier d.marmier@bluewin.ch writes:
-static type_t std_bool = { "boolean" }; -static type_t std_int = { "int" }; -static type_t std_int64 = { "__int64" }; -static type_t std_uhyper = { "MIDL_uhyper" }; +static char name_bool[] = "boolean"; +static char name_int[] = "int"; +static char name_int64[] = "__int64"; +static char name_uhyper[] = "MIDL_uhyper";
+static type_t std_bool = { name_bool }; +static type_t std_int = { name_int }; +static type_t std_int64 = { name_int64 }; +static type_t std_uhyper = { name_uhyper };
+static char name_tagged_union[] = "tagged_union";
You should never need to declare non-const strings. If you need that, it's because some other types are not properly declared const, and this is what needs to be fixed. The only case where a non-const string would be appropriate is if the string itself really needs to be written to, but that's a very rare case.