Commit b52114d2 by Geoffrey Keating Committed by Geoffrey Keating

In gcc/: 2000-11-09 Geoffrey Keating <geoffk@redhat.com>

In gcc/:
2000-11-09  Geoffrey Keating  <geoffk@redhat.com>

	* c-decl.c (finish_struct): When a structure is completed,
	check all its variant types for completeness.

In gcc/testsuite/:
2000-11-09  Geoffrey Keating  <geoffk@redhat.com>

	* gcc.c-torture/compile/20001109-1.c: New test.
	* gcc.c-torture/compile/20001109-2.c: New test.

From-SVN: r37346
parent a949941c
2000-11-09 Geoffrey Keating <geoffk@redhat.com>
* c-decl.c (finish_struct): When a structure is completed,
check all its variant types for completeness.
2000-11-09 Neil Booth <neilb@earthling.net>
* cpphash.c: Move cpp_defined here from cpplib.c.
......
......@@ -5573,7 +5573,7 @@ finish_struct (t, fieldlist, attributes)
tree decl;
for (decl = current_binding_level->names; decl; decl = TREE_CHAIN (decl))
{
if (TREE_TYPE (decl) == t
if (TYPE_MAIN_VARIANT (TREE_TYPE (decl)) == TYPE_MAIN_VARIANT (t)
&& TREE_CODE (decl) != TYPE_DECL)
{
layout_decl (decl, 0);
......
2000-11-09 Geoffrey Keating <geoffk@redhat.com>
* gcc.c-torture/compile/20001109-1.c: New test.
* gcc.c-torture/compile/20001109-2.c: New test.
2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.pt/operator1.C: New test.
......
typedef struct _foo foo;
extern foo bar;
struct _foo {
int a;
};
int tst[__alignof__ (bar) >= __alignof__ (int) ? 1 : -1];
extern struct foo bar;
struct foo {
int a;
};
int tst[__alignof__ (bar) >= __alignof__ (int) ? 1 : -1];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment