W
walter
I wrote a program, and found one line of source code
not compiled out. I rewrote it for simplicity as below.
The comment in the program is big5 code text.
--- my program ---
main(){
int i, a[8];
for (i=0;i<3;i++) a=0;
// Á×§K³Q·j´M¦¨¥\
a[3]=-1;
for (i=0;i<4;i++)
printf("%d ",a);
}
--- end of my program ---
The output is not "0 0 0 -1" because the comment is ended
with "\", and this makes a[3]=-1 to be regarded as comment.
I wonder this is a bug or not?
not compiled out. I rewrote it for simplicity as below.
The comment in the program is big5 code text.
--- my program ---
main(){
int i, a[8];
for (i=0;i<3;i++) a=0;
// Á×§K³Q·j´M¦¨¥\
a[3]=-1;
for (i=0;i<4;i++)
printf("%d ",a);
}
--- end of my program ---
The output is not "0 0 0 -1" because the comment is ended
with "\", and this makes a[3]=-1 to be regarded as comment.
I wonder this is a bug or not?