Chinaunix首页 | 论坛 | 博客
  • 博客访问: 125252
  • 博文数量: 21
  • 博客积分: 898
  • 博客等级: 准尉
  • 技术积分: 236
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-22 10:32
文章存档

2011年(8)

2010年(1)

2009年(6)

2008年(6)

我的朋友

分类: WINDOWS

2011-09-13 16:02:58

使用EWARM5.41编译同事的项目,提示Internal Error: [CoreUtil/General]: Illegal state ,但没有提示代码哪里出了问题。google了一下,网上的答案是:
The use of a __bit bool variable in a switch statement generates the internal error: Internal Error: [CoreUtil/General]: Illegal state. Workaround: Instead of bool switch variables use char variables, or even better rewrite the switch statement to an if-then-else statement: 
if(bool == 0) 

  // case 0: 

else if(bool == 1) 

  // case 1: 
}
仔细看了出问题的文件,没有发现有哪个switch语句使用了bool类型,没有办法,只能在5000行的代码中,把每个函数的代码部分注释,找到了出错的函数,然后再以此注释每条语句,终于找到了出错的语句-_-!!!,真TMD坑爹。
查到原因是因为用浮点数进行左移操作,例如:
double BB[2];
uchar AA;
AA = ((uchar)BB << 4) + ((uchar)BB[1] << 4);
 
项目都已经出货了,不应该编译不过啊,可能是因为高版本编译器无法编译通过,但低版本的可以。想装个EWARM5.11来验证一下的,但没有找到安装程序,只好做罢。
Date:2011/0913,重新安装了EWARM5.50之后,可以编译通过了。
阅读(2812) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~