[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] gcc 2.95,was: Re: [Mint-cvs] [FreeMiNT CVS] freemint/sys/sockets/inet4



Am 02.01.2010, 01:32 Uhr, schrieb Vincent Rivière <vincent.riviere@freesbee.fr>:

Helmut Karlowski wrote:
Do you mean something like this:
 #define X -1
 #if X != -1
#error  "X != -1"
#endif

Yes.
Unfortunately I have currently no access to GCC 2.95 right now. I will check again next week.

My example comes from the binutils patch:

-#if EOF != -1
+#if !(EOF == -1) /* gcc 2.95.3 has bug in '!=' operator for negative constants */
   #error "hex.c requires EOF == -1"
  #endif

The gcc 2.95.2 I have on the TT says:

t.c:5: #error "X != -1"
t.c:11: #error "X == -1"

which is obviously wrong (tertiam non datur)!


--
Helmut Karlowski