[M3devel] release engineering 5.8: code generator error for IP address initializers
Jay K
jay.krell at cornell.edu
Sat Apr 17 03:50:54 CEST 2010
There is this thing I read, where the types of values/constants are known without context.
The left hand side does not change the type of the right.
That confuses me here. It would imply the right is an open array.
- Jay
Subject: Re: [M3devel] release engineering 5.8: code generator error for IP address initializers
From: hosking at cs.purdue.edu
Date: Fri, 16 Apr 2010 11:04:49 -0400
CC: wagner at elegosoft.com; m3devel at elegosoft.com
To: jay.krell at cornell.edu
You are confusing open array types with array constructors.
On 16 Apr 2010, at 08:15, Jay K wrote:
(back to the topic :) )
somewhat reduced case:
MODULE Main;
TYPE T1 = ARRAY [0..0] OF INTEGER;
CONST const: T1 = ARRAY OF INTEGER{2};
This is an array constructor.
I suspect this is the same issue as in my previous e-mail. The following concise rewrite should work:
CONST const = T1{2};
BEGIN
END Main.
The problem is two global integers are overlapping.
The open array size and its first element.
new source -> compiling Main.m3
"..\Main.m3", line 5: warning: not used (const)
m3front:cg:Init_int:NOT in_init: o: 32 s:32 value:2 <==
m3front:cg:Init_int:NOT in_init: o: 32 s:32 value:1 <==
m3front:cg:Init_int:NOT in_init: o: 384 s:32 value:3
m3front:cg:Init_int:in_init: o: 32 s:32 value:1
m3front:cg:Init_int:in_init: o: 32 s:32 value:2
Are these syntaxes legal?
This apparent mixing of open and fixed arrays?
- Jay
> Date: Fri, 16 Apr 2010 12:50:48 +0200
> From: wagner at elegosoft.com
> To: jay.krell at cornell.edu
> CC: m3devel at elegosoft.com
> Subject: RE: [M3devel] release engineering 5.8: code generator error for IP address initializers
>
> I agree. Regular expressions in quake would be great for regression tests.
> Perhaps for the next release?
>
> Olaf
>
> Quoting Jay K <jay.krell at cornell.edu>:
>
> > "aside":
> >
> > http://hudson.modula3.com:8080/job/cm3-test-m3tests-AMD64_FREEBSD/lastBuild/testReport/(root)/m3tests/p206__ARRAY_constructors_in_var_decls_using_named_open_array_types/
> >
> > http://hudson.modula3.com:8080/job/cm3-test-m3tests-AMD64_FREEBSD/lastBuild/testReport/(root)/m3tests/r004__negative_size_for_an_open_array/
> >
> >
> > It'd be nice if in Quake we had something regular expression-ish, so
> > that we could factor out the line numbers, such as e.g. to match
> > any decimal number.
> >
> >
> > Maybe just check for lines that start how we expect and cut them off
> > at some position.
> > That might be doable with today's Quake.
> >
> >
> >
> > - Jay
> >
> >
> >
> >> Date: Fri, 16 Apr 2010 11:45:09 +0200
> >> From: wagner at elegosoft.com
> >> To: m3devel at elegosoft.com
> >> Subject: [M3devel] release engineering 5.8: code generator error
> >> for IP address initializers
> >>
> >> We also have this error, which should perhaps not be ignored?
> >>
> >> http://hudson.modula3.com:8080/job/cm3-test-m3tests-AMD64_FREEBSD/lastBuild/testReport/(root)/m3tests/p204__IP_address_initializers
> >>
> >> Olaf
> >> --
> >> Olaf Wagner -- elego Software Solutions GmbH
> >> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
> >> phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
> >> http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
> >> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
> >>
> >
>
>
>
> --
> Olaf Wagner -- elego Software Solutions GmbH
> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
> phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
> http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100417/27bb58a0/attachment-0002.html>
More information about the M3devel
mailing list