⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bug-460444.c

📁 sdcc是为51等小型嵌入式cpu设计的c语言编译器支持数种不同类型的cpu
💻 C
字号:
/* bug 460444 */#include <testfwk.h>voidtestXOR(void){  volatile int p = 5;    if (p ^ 0x60) {    // Good.  }  else {    FAIL();  }  /* Test is to see if it compiles. */  ASSERT((p^0x60) == 0x65);  ASSERT((p&0x61) == 0x01);  ASSERT((p|0x60) == 0x65);  p = 0x1234;  if (p ^ 0x5678) {    // Good.  }  else {    FAIL();  }  if (p & 0x4324) {    // Good  }  else {    FAIL();  }  if (p | 0x1279) {    // Good  }  else {    FAIL();  }}voidtestLeftRightXor(void){  volatile int left, right;  left = 0x123;  right = 0x8101;  if (left ^ right) {    // Good  }  else {    FAIL();  }  if (left & right) {    // Good  }  else {    FAIL();  }  if (left | right) {    // Good  }  else {    FAIL();  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -