Fix TYPE_DECLARED_CLASS thinko
Simon pointed out an error that I made in
compile_cplus_conver_struct_or_union in my original C++ compile submission:
if (type->code () == TYPE_CODE_STRUCT)
{
const char *what = TYPE_DECLARED_CLASS (type) ? "struct" : "class";
resuld = instance->plugin ().build_decl
(what, name.get (), (GCC_CP_SYMBOL_CLASS | nested_access
| (TYPE_DECLARED_CLASS (type)
? GCC_CP_FLAG_CLASS_NOFLAG
: GCC_CP_FLAG_CLASS_IS_STRUCT)),
0, nullptr, 0, filename, line);
}
Notice that WHAT will contain "struct" for TYPE_DECLARED_CLASS. Whoops.
Fortunately this first parameter of build_decl is only used for
debugging.
gdb/ChangeLog
2021-03-24 Keith Seitz <keiths@redhat.com>
* compile/compile-cplus-types.c
(compile_cplus_convert_struct_or_union): Fix TYPE_DECLARED_CLASS
thinko.