Hi Andrew,
and, first, thanks for the help.
The C++ front-end creates an INTEGER_CST with a record type which
seems wrong and
could cause bugs in the future. This patch fixes it by creating an
empty
constructor instead which is the correct thing to do. I found this
while looking
into how to fix PR 20408 and I had originally thought this was the
cause of that
PR. Anyways we create these for empty structs only when we are
gimplifing
EMPTY_CLASS_EXPR.
I wonder (very naively, sorry) why this construction work?!? I mean,
if the memory allocated for an EMPTY_CLASS_EXPR is considered simply
as a data member of built-in type, automatically no actual
construction is needed. I must be missing something (ABI-related?)
otherwise I cannot understand why we cannot deal with an
EMPTY_CLASS_EXPR similarly to
struct EMPTY_CLASS_TYPE
{
char dummy;
};
EMPTY_CLASS_TYPE EMPTY_CLASS_EXPR;