📄 bug-751703.c
字号:
/* bug-751703.c Make sure extern within local scope binds to global scope and is not optimized inappropriately. */#include "testfwk.h"int x = 1;int y = 2;int z = 0;static voidaddxy(void){ extern int x, y, z; z = x+y;} static voidtimes10x(void){ unsigned char x; z = 0; for (x=0; x<10; x++) { extern int x; /* bind to the global x */ z += x; }}static voidtestExternDeadCode(void){ ASSERT(z == 0); addxy(); ASSERT(z == 3); times10x(); ASSERT(z == 10);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -