From: Michael Beck Date: Mon, 1 Sep 2008 00:21:05 +0000 (+0000) Subject: add testcase for union cast X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=8406b1e1bbc1eb0487f1f4eb38e5e20ee1f62d58;hp=1fed691f0daf9eb74d4726868048766323adfe67;p=cparser add testcase for union cast [r21611] --- diff --git a/parsetest/gnu99/union_cast.c b/parsetest/gnu99/union_cast.c new file mode 100644 index 0000000..088aa48 --- /dev/null +++ b/parsetest/gnu99/union_cast.c @@ -0,0 +1,16 @@ +union foo { int i; double d; }; +int x; +double y; + +union foo u; + +void hack (union foo p) { + y = p.d; +} + +int main(int argc, char *argv[]) { + u = (union foo) x; + + hack ((union foo) x); + return 0; +}