Re: [CIL users] Arrays with no constant dimensions as arguments

2011-02-12 Thread Gabriel Kerneis
On Sat, Feb 12, 2011 at 06:54:05AM +0200, Zakkak Foivos wrote: > for a function with this signature: > void foo(int DIM, float *A[DIM][DIM]) > > it gives the following > > Bug: Invalid length in array type: DIM Hmmm. Obviously, CIL only handles one-dimensional variable-length arrays. I'll try

Re: [CIL users] Arrays with no constant dimensions as arguments

2011-02-11 Thread Zakkak Foivos
unfortunately it didn't work for a function with this signature: void foo(int DIM, float *A[DIM][DIM]) it gives the following Bug: Invalid length in array type: DIM Context : 2cil: init Error: Cabs2cil had some errors Fatal error: exception Errormsg.Error Raised at file "ocamlutil/errormsg.m

Re: [CIL users] Arrays with no constant dimensions as arguments

2011-02-11 Thread Zakkak Foivos
On 02/11/2011 10:48 PM, Gabriel Kerneis wrote: > On Fri, Feb 11, 2011 at 05:44:23PM +0100, Gabriel Kerneis wrote: >> But you are absolutely correct that there is a bug in CIL. Thank you >> very much for spotting it. > > Should be fixed in svn (r12128). Could you confirm that it works for > you, p

Re: [CIL users] Arrays with no constant dimensions as arguments

2011-02-11 Thread Gabriel Kerneis
On Fri, Feb 11, 2011 at 05:44:23PM +0100, Gabriel Kerneis wrote: > But you are absolutely correct that there is a bug in CIL. Thank you > very much for spotting it. Should be fixed in svn (r12128). Could you confirm that it works for you, please? Best, -- Gabriel Kerneis -

Re: [CIL users] Arrays with no constant dimensions as arguments

2011-02-11 Thread Gabriel Kerneis
Dear Foivos, On Wed, Jan 19, 2011 at 09:52:36AM +0200, Foivos Zakkak wrote: > Subject: [CIL users] Arrays with no constant dimensions as arguments It's called variable-sized array in C99, and should be supported by CIL (ie. compiled away as a regular array using alloca). But you are absolutely c

Re: [CIL users] Arrays with no constant dimensions as arguments

2011-01-19 Thread Foivos Zakkak
Hello again, I also noticed that neither the following example is supported. float (**myA)[DIM] = (float (**)[])A; it throughs "Error: Length of array is not a constant: DIM" but the same declaration is fine with gcc. Thank you Zakkak Foivos On 01/19/2011 09:52 AM, Foivos Zakkak wrote: > Hello