From owner-freebsd-current@FreeBSD.ORG Fri Sep 5 01:25:25 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB1D916A4C0 for ; Fri, 5 Sep 2003 01:25:25 -0700 (PDT) Received: from firecrest.mail.pas.earthlink.net (firecrest.mail.pas.earthlink.net [207.217.121.247]) by mx1.FreeBSD.org (Postfix) with ESMTP id B383743FFD for ; Fri, 5 Sep 2003 01:25:24 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfjg5.dialup.mindspring.com ([165.247.206.5] helo=mindspring.com) by firecrest.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19vBtZ-0000Gm-00; Fri, 05 Sep 2003 01:24:42 -0700 Message-ID: <3F5847FF.65875366@mindspring.com> Date: Fri, 05 Sep 2003 01:23:27 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Alexander Leidinger References: <20030904180448.021a1b6b.Alexander@Leidinger.net> <20030905001411.3a9030b3.Alexander@Leidinger.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a42c1063ce8e83d3f122e52e2add137125350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c cc: Dan Nelson cc: current@freebsd.org Subject: Re: Question about genassym, locore.s and 0-sizedarrays(showstopper for an icc compiled kernel) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2003 08:25:26 -0000 Alexander Leidinger wrote: > Dan Nelson wrote: > > If you're talking FreeBSD 5, you should be able to simply subsitute a > > C99 "flexible array member" (basically replace "[0]" with "[]") and get > > the same effect. 0-length arrays are a gcc extension: > > > > http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > > > > Under FreeBSD 4.x, you can't use them because gcc 2.95 only supports > > the gcc extension. Intel has added support for a lot of gcc extensions > > recently; they may be willing to add this to the list. > > Please read my mail again, icc already supports my_array[0], but the > resulting array in the binary has size '1'. The actual showstopper is > the output of genassym.sh. To me it seems it's just a genassym.sh issue, > but I don't really know what's going on in the kernel, so I ask here. The ICC is wrong. If they are supporting a GNU extension, they must do it the same way GNU does it, to actually be supporting it. The main issue here is that any reader of the object file, not just genassym.sh, will be unable to differentiate [0] vs. [1]. What does ICC do for "[]"? Is it '1' also, or is it '0', like it's supposed to be? I, for one, would not be unhappy to see the GCC-ism fade into history. -- Terry