[patchv2] compile: Fix crash on cv-qualified self-reference
Yao Qi
qiyaoltc@gmail.com
Wed Jul 1 14:06:00 GMT 2015
Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> I can change it that way but when you ask "isn't cleaner" then no, I think
> your hack is even a bit more ugly than my ugly hack.
>
OK, that is sort of personal preference, that is fine to me to leave it
as is.
> There should be two virtual methods, one pure for 'switch (TYPE_CODE (type))'
> and the other one checking TYPE_INSTANCE_FLAG* in superclass overriden only by
> TYPE_CODE_STRUCT and TYPE_CODE_UNION (there would be no TYPE_CODE_*, though).
If we change to virtual methods, we don't need "switch" at all. Each type
can have its virtual method to handle this separately.
--
Yao (齐尧)
More information about the Gdb-patches
mailing list