• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Relaxing gcc type comparison ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Templates, STL, const_iterator supported?
  • Next by Date: Re: GCC for i386 allows 'invalid suffix "f" on integer constant'
  • Previous by thread: Re: GCC for i386 allows 'invalid suffix "f" on integer constant'
  • Next by thread: Intel Compiler
  • Index(es):
    • Date
    • Thread