From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12006 invoked from network); 25 Jun 2003 13:04:58 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 25 Jun 2003 13:04:58 -0000 Received: (qmail 11681 invoked by alias); 25 Jun 2003 13:04:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18634 Received: (qmail 11673 invoked from network); 25 Jun 2003 13:04:53 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 25 Jun 2003 13:04:53 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [192.18.98.34] by sunsite.dk (MessageWall 1.0.8) with SMTP; 25 Jun 2003 13:4:53 -0000 Received: from sunfin.Finland.Sun.COM ([129.159.101.10]) by brmea-mail-3.sun.com (8.12.9/8.12.9) with ESMTP id h5PD4p1J024198; Wed, 25 Jun 2003 07:04:52 -0600 (MDT) Received: from ultrahot.Finland.Sun.COM (ultrahot [129.159.101.87]) by sunfin.Finland.Sun.COM (8.12.9+Sun/8.12.9/ENSMAIL,v2.3beta) with ESMTP id h5PD4ocP007316; Wed, 25 Jun 2003 16:04:50 +0300 (EEST) Received: from ultrahot.Finland.Sun.COM (localhost [127.0.0.1]) by ultrahot.Finland.Sun.COM (8.12.9+Sun/8.12.9) with ESMTP id h5PD4oHI001439; Wed, 25 Jun 2003 16:04:50 +0300 (EEST) Received: (from tomppa@localhost) by ultrahot.Finland.Sun.COM (8.12.9+Sun/8.12.9/Submit) id h5PD4nHX001436; Wed, 25 Jun 2003 16:04:49 +0300 (EEST) From: Tomi Vainio - Sun Finland MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16121.40426.895830.486936@ultrahot.finland.sun.com> Date: Wed, 25 Jun 2003 16:04:42 +0300 To: Oliver Kiddle Cc: zsh-workers@sunsite.dk Subject: Re: 4.1.1 doesn't compile In-Reply-To: <16121.36471.200540.460093@ultrahot.finland.sun.com> References: <16120.21181.974421.168422@ultrahot.finland.sun.com> <13714.1056468548@gmcs3.local> <16121.23378.685635.437515@ultrahot.finland.sun.com> <21028.1056534512@gmcs3.local> <16121.36471.200540.460093@ultrahot.finland.sun.com> X-Mailer: VM 7.16 under 21.4 (patch 9) "Informed Management" XEmacs Lucid Reply-To: Tomi.Vainio@Sun.COM > Oliver Kiddle writes: > Tomi Vainio - Sun Finland wrote: > > I also found another problem but this time only when I try to compile > > 32bit binary. > > > > Compiler is Sun ONE Studio 8, Compiler Collection > cc: Sun C 5.5 Patch 112760-01 2003/05/18 > > > > cc -c -I. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -xO4 -o compat.o compat.c > > "compat.c", line 441: variable length array can not be declared with a static storage class: llbuf > > cc: acomp failed for compat.c > > This I can't reproduce. The compiler I have is older than that. > > The line in question is: > static char llbuf[DIGBUFSIZE]; > and system.h defines: > #define DIGBUFSIZE ((int)(((sizeof(zlong) * 8) - 1) * 0.30103) + 3) > > So quite why the compiler thinks it has a variable length array I > don't understand. Could you perhaps try substituting that in directly > and see if you can tweak it to work. The int cast might be causing the > problem in which case the * 0.30103 could perhaps be changed to * 30103 > / 100000. But I don't understand what the calculation is doing. Anyone > else have any idea? > I found our bug report about this same thing. There is a lot of talk about C90 and C99 standards and how this should really work. BugID 4800684 compiler treats a usual array as VLA 4841119 zsh needs a minor fix to build with latest k2 compiler Work Around Use -xc99=%none options if C99 features are not required. or system.h line 421 - #define DIGBUFSIZE ((int)(((sizeof(zlong) * 8) - 1) * 0.30103) + 3) + #define DIGBUFSIZE ((int)(((sizeof(zlong) * 8) - 1) * 30103/100000) + 3) Tomppa