Hydrogen-python/test8.c
2025-06-11 19:51:42 +08:00

20 lines
374 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* test8带错误的语法测试用于验证报错机制*/
int main() {
int x;
x = ; /* 错误:缺少右值 */
return x;
}
int main1() {
int x;
x == 10; /* 错误:应为赋值 = */
return x;
}
int main2() {
int x;
if (x) /* 错误if 条件必须是整型表达式 */
return 1;
return 0;
}