[M3devel] subranges 0..-1?

Michael Richter ttmrichter at gmail.com
Mon Oct 4 04:23:37 CEST 2010


What does an ARRAY [0..-1] OF <anything> actually look like?

On 3 October 2010 20:51, Jay K <jay.krell at cornell.edu> wrote:

>
> ../src/Common/X.i3: In function 'X_I3':
> ../src/Common/X.i3:4845:0: internal compiler error: in
> m3cg_declare_subrange, at m3cg/parse.c:3567
>
>
>   gcc_assert (min <= max);
>
>   XClientMessageEvent = RECORD
>      type: int;
>      serial: unsigned_long;    (* # of last request processed by server *)
>      send_event: Bool;         (* true if this came from a SendEvent
> request *)
>      display: DisplayStar;     (* Display the event was read from *)
>      window: Window;
>      message_type: Atom;
>      format: int;
>      alignment: ARRAY [0..-1] OF long;
>      data: ARRAY [0..MAX (20 * BYTESIZE (char),
>                           MAX (10 * BYTESIZE (short),
>                                5 * BYTESIZE (long))) - 1] OF char; END;
>
>
>      alignment: ARRAY [0..-1] OF long;
>
>
> typedef struct {
>     int type;
>     unsigned long serial;    /* # of last request processed by server */
>     Bool send_event;    /* true if this came from a SendEvent request */
>     Display *display;    /* Display the event was read from */
>     Window window;
>     Atom message_type;
>     int format;
>     union {
>         char b[20];
>         short s[10];
>         long l[5];
>         } data;
> } XClientMessageEvent;
>
>
>
> eh?
>
>
> I'll remove the assert.
> "Clearly"? the Modula-3 should just use an array of long though for the
> union?
>
>
>  - Jay
>
>




-- 
"Perhaps people don't believe this, but throughout all of the discussions of
entering China our focus has really been what's best for the Chinese people.
It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20101004/220b0cd5/attachment-0002.html>


More information about the M3devel mailing list