re PR c/2735 (can't cast a union type defined by a typedef to itself)
authorJoseph Myers <jsm28@cam.ac.uk>
Tue, 5 Jun 2001 10:16:57 +0000 (11:16 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Tue, 5 Jun 2001 10:16:57 +0000 (11:16 +0100)
commitf375b7a70574ae0e5900a3bfab24f4e8e2edc920
tree1fd1975b4d0c77798a8a119b0e636835eb760457
parentc90efa7a1c9023899bc6b832a3122c0a9c932e39
re PR c/2735 (can't cast a union type defined by a typedef to itself)

* c-typeck.c (build_c_cast): Use TYPE_MAIN_VARIANT when checking
for casting an aggregate to its own type.  Fixes PR c/2735.

testsuite:
* gcc.c-torture/compile/20010605-2.c: New test.

From-SVN: r42900
gcc/ChangeLog
gcc/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20010605-2.c [new file with mode: 0644]