V
Victor Eijkhout
Intel icc seems to think that enums are not ints:
#include <stdlib.h>
typedef enum { TRUE=1, FALSE=0 } Truth;
#undef __FUNCT__
#define __FUNCT__ "getcontrols"
int getcontrols(Truth *screen)
{
Truth flg=FALSE;
*screen = !flg;
return 0;
}
flg.c(10): warning #188: enumerated type mixed with another type
*screen = !flg;
^
But as far as I can read the standard, this should be perfectly
legitimate. Can anyone shed light on this?
Victor.
#include <stdlib.h>
typedef enum { TRUE=1, FALSE=0 } Truth;
#undef __FUNCT__
#define __FUNCT__ "getcontrols"
int getcontrols(Truth *screen)
{
Truth flg=FALSE;
*screen = !flg;
return 0;
}
flg.c(10): warning #188: enumerated type mixed with another type
*screen = !flg;
^
But as far as I can read the standard, this should be perfectly
legitimate. Can anyone shed light on this?
Victor.