From owner-freebsd-current@FreeBSD.ORG Fri Sep 5 02:09:27 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 2208C16A4BF for ; Fri, 5 Sep 2003 02:09:27 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B2DA43F3F for ; Fri, 5 Sep 2003 02:09:25 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfjg5.dialup.mindspring.com ([165.247.206.5] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19vCa7-00079V-00; Fri, 05 Sep 2003 02:08:40 -0700 Message-ID: <3F585230.6868CB64@mindspring.com> Date: Fri, 05 Sep 2003 02:06:56 -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> <20030904162858.GI98381@dan.emsphone.com> <20030905001411.3a9030b3.Alexander@Leidinger.net> <20030904225123.GB39916@dan.emsphone.com> <20030905105507.51ba3183.Alexander@Leidinger.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4af32e7608f5da88178fb1a8a2d9751ea667c3043c0873f7e350badd9bab72f9c350badd9bab72f9c cc: Dan Nelson cc: current@freebsd.org Subject: Re: Question about genassym, locore.s and 0-sizedarrays(showstopperfor 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 09:09:27 -0000 Alexander Leidinger wrote: > On Fri, 05 Sep 2003 01:38:29 -0700 > Terry Lambert wrote: > > Dan Nelson wrote: > > > I guess the correct question to be asking is "does the ELF format allow > > > 0-length symbols?" > > > > It does, according to my reading of it. They may have an issue with > > dead code removal or element aliasing. The way to find out would be > > to see what they emit for "[]"... 0 lenth, or 1? > > % char array[]; > > % nm icc.o > 00000001 C array Now try: struct foo { char c; int i; long array[]; }; struct foo foo;m struct foo fee[1]; struct foo fie[3]; struct foo foe[0]; struct foo fum[1]; on both compilers. If they end up the same, then Intel needs to change to using the 0. If they end up different, then they are broken relative to the C99 standard and zero length arrays a final elements in structures. -- Terry