There is a real problem with v 7.0.
#include <stdio.h>
void test1(char a, char b)
{
if ((unsigned char)b >= (unsigned char)a) puts("unsigned char");
else puts("signed char");
}
#pragma optimize(none)
void test2(char a, char b)
{
if ((unsigned char)b >= (unsigned char)a) puts("unsigned char");
else puts("signed char");
}
#pragma optimize()
int main(int argc, char **argv)
{
char a = 122, b = 166;
test1(a, b);
test2(a, b);
return 0;
}
returns
signed char
unsigned char
This problem has not been fixed in Version 7.0r.
Robert Wishlaw