Re: [PATCH 9/9] C++ compile support

Keith Seitz via Gdb-patches
2021-03-24T14:52:04Z

On 3/23/21 6:04 PM, Simon Marchi wrote:
> Hi Keith,
>
> I am from the past...

Hahaha... That's okay; I feel like I am living in the past!

> On 2018-08-10 7:25 p.m., Keith Seitz wrote:
>> + gcc_decl resuld;
>> + if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
>> + {
>> + const char *what = TYPE_DECLARED_CLASS (type) ? "struct" : "class";
>
> I don't know if this matters, but the condition above looks reversed,
> can you confirm?

Wowser. Good catch!

While it should *of course* be corrected, the first parameter there is
essentially for debugging, so it is not critical that this be propagated
everywhere:

gcc_expr build_decl (const char *debug_decltype, const char *name,
enum gcc_cp_symbol_kind sym_kind, gcc_type sym_type,
const char *substitution_name, gcc_address address,
const char *filename, unsigned int line_number);

Let me know if you want me to clean up my boo-boo or whether you've
patch-in-hand to push already.

Keith