Relaxing gcc type comparison ?
Relaxing gcc type comparison ?
- Subject: Relaxing gcc type comparison ?
- From: Mark Thomas <email@hidden>
- Date: Thu, 19 Jan 2006 17:50:18 +0000
- Organization: Coderus Ltd
Hi,
Is there a way get gcc4 to relax its type comparison back to how it was in
gcc33, as I'm getting the following
error: a cast to a type other than an integral or enumeration type cannot
appear in a constant-expression
As I have some #define's which are constants, but they are casted to
typedef for defaults, and previously this compiled fine. E.g.
typedef struct OBJECT__ *OBJECT;
#define RES_OBJ ((OBJECT) (ULONG_PTR)((LONG)0x80000000) )
switch ( (int)res )
{
case (int)RES_OBJ:
{
..... etc
}
}
But it doesn't recognise it's ended up with (int). I also tried
const int h1=(int)RES_OBJ;
switch ( (int)res )
{
case h1:
{
..... etc
}
}
Also didn't work :-(.
Thanks
Mark.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden