[M3devel] LONGINT -> more bugs in m3tk
Coleburn, Randy
rcolebur at SCIRES.COM
Wed May 18 20:27:44 CEST 2011
While we are on the subject of the stub generator, there is another long-standing problem.
I've submitted this one years ago and I think I still have the example program I devised to show it.
So, I'll try to dig this up and put it into the bug tracker.
The basic situation is that there are cases where the stub generator doesn't generate imports for all interfaces needed by the resulting stub. You can work around this problem by manually editing the generated stub to provide the missing imports, but this gets old quickly.
I'll send a follow-up post with the details once I find them in my archives.
Regards,
Randy Coleburn
-----Original Message-----
From: Mika Nystrom [mailto:mika at async.caltech.edu]
Sent: Tuesday, May 17, 2011 9:36 PM
To: Rodney M. Bates
Cc: m3devel at elegosoft.com
Subject: Re: [M3devel] LONGINT -> more bugs in m3tk
I think you'll get that error if you run stubgen on anything that references
a type from BasicCtypes (e.g., int, char_star ...)
I'm pretty sure I actually got it running the stub generator for my
Scheme interpreter, which I have posted links to here a few times, but I
haven't had time to push into CM3 yet.
Mika
"Rodney M. Bates" writes:
>Mika, can you tell me what main program and command you used to get these erro
>rs?
>It would help me to test changes to m3tk.
>
>On 04/26/2011 11:28 AM, Rodney M. Bates wrote:
>> I just checked in a patch tp M3CExpValue.m3 in m3tk, in the head, which I be
>lieve will fix this
>> bug. I compiled it, but have not tested it, as I am sure Mika has this case
>to retry
>> more quickly than I can.
>>
>> On 04/19/2011 06:51 AM, Mika Nystrom wrote:
>>> 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 e
>rror in arguments to binary operator
>>> "/usr/local/cm3/pkg/m3core/src/C/64BITS/BasicCtypes.i3", line 18,25: bad nu
>meric literal
>>> "/usr/local/cm3/pkg/m3core/src/C/64BITS/BasicCtypes.i3", line 18,51: bad nu
>meric 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