#include <stdio.h> union foo { int i; double d; }; int x; double y; int main(void) { union foo u; x = 10; u = (union foo) x; return; } |
.file "test65.c" .version "01.01" gcc2_compiled.: .text .align 4 .globl main .type main,@function main: pushl %ebp movl %esp,%ebp subl $24,%esp movl $10,x movl x,%eax movl %eax,-8(%ebp) movl %edx,-4(%ebp) jmp .L2 .p2align 4,,7 .L2: movl %ebp,%esp popl %ebp ret .Lfe1: .size main,.Lfe1-main .comm x,4,4 .comm y,8,8 .ident "GCC: (GNU) 2.95.3 20010315 (release)" |
#include <stdio.h> union foo { int i; double d; }; int x; double y; int main(void) { union foo u; x = 10; u.i = x; return; } |
.file "test66.c" .version "01.01" gcc2_compiled.: .text .align 4 .globl main .type main,@function main: pushl %ebp movl %esp,%ebp subl $24,%esp movl $10,x movl x,%eax movl %eax,-8(%ebp) jmp .L2 .p2align 4,,7 .L2: movl %ebp,%esp popl %ebp ret .Lfe1: .size main,.Lfe1-main .comm x,4,4 .comm y,8,8 .ident "GCC: (GNU) 2.95.3 20010315 (release)" |