- 论坛徽章:
- 5
|
从定义的意义讲:一个是100, 一个是SIZE常量,被赋值为100
从编译之后看:
- .file "b.c"
- .text
- .globl main
- .type main, @function
- main:
- .LFB0:
- .cfi_startproc
- pushq %rbp
- .cfi_def_cfa_offset 16
- .cfi_offset 6, -16
- movq %rsp, %rbp
- .cfi_def_cfa_register 6
- movl $100, -4(%rbp)
- movl $100, %eax
- popq %rbp
- .cfi_def_cfa 7, 8
- ret
- .cfi_endproc
- .LFE0:
- .size main, .-main
- .ident "GCC: (GNU) 4.8.2 20140120 (Red Hat 4.8.2-16)"
- .section .note.GNU-stack,"",@progbits
复制代码 是两回事
一个是直接就是#define SIZE 100是在编译的时候就已经把SIZE替换成100了,因为是预编译的
SIZE=100,是当运行的时候,将100赋值给SIZE |
|