[M3devel] LONGINT -> more bugs in m3tk

Mika Nystrom mika at async.caltech.edu
Tue Apr 19 13:51:06 CEST 2011


Hello m3devel,

If anyone knows how to fix the following trivially, please go ahead.

"/usr/local/cm3/pkg/m3core/src/C/64BITS/BasicCtypes.i3", line 18,45: type error in arguments to binary operator
"/usr/local/cm3/pkg/m3core/src/C/64BITS/BasicCtypes.i3", line 18,25: bad numeric literal
"/usr/local/cm3/pkg/m3core/src/C/64BITS/BasicCtypes.i3", line 18,51: bad numeric literal

(errors reported by m3tk).

The offending line is:

INTERFACE BasicCtypes;

IMPORT Word, Long;

TYPE
  (* the four signed integer types *)
  signed_char        = [-16_7f-1 .. 16_7f];
  short_int          = [-16_7fff-1 .. 16_7fff];
  int                = [-16_7fffffff-1 .. 16_7fffffff];
  long_int           = [-16_7fffffffffffffff -1  .. 16_7fffffffffffffff ];
  long_long          = [-16_7fffffffffffffffL-1L .. 16_7fffffffffffffffL];   (** HERE **)

  (* the four unsigned integer types *)
  unsigned_char      = [16_0 .. 16_ff];
  unsigned_short_int = [16_0 .. 16_ffff];
  unsigned_int       = [16_0 .. 16_ffffffff];
  unsigned_long_int  = Word.T;
  unsigned_long_long = Long.T;

  (* the three floating types *)
  float              = REAL;
  double             = LONGREAL;
  long_double        = EXTENDED;

  (* char *)
  char               = signed_char;

END BasicCtypes.

I'll look at it myself, but not immediately (no time).  Workaround for now.

    Mika



More information about the M3devel mailing list