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

Re: [MiNT] mintlib problem



Alan Hourihane <alanh@fairlite.demon.co.uk> writes:

> Back to MIN/MAX definitions.
>
> Anyone try compiling this ??
>
> #define MAX(a,b)                      \
> ({                                  \
>         __typeof__ (a) _a = (a);      \
>         __typeof__ (b) _b = (b);      \
>         _a > _b ? _a : _b;           \
> })
>
> enum { VALUE = MAX (1000, 10) };

  6.7.2.2 Enumeration specifiers

  Constraints

  2 The expression that defines the value of an enumeration constant
  shall be an integer constant expression that has a value representable
  as an int.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."