From owner-freebsd-current@FreeBSD.ORG Fri Sep 5 04:04:43 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 0E2D216A4BF; Fri, 5 Sep 2003 04:04:43 -0700 (PDT) Received: from fafoe.narf.at (chello212186121237.14.vie.surfer.at [212.186.121.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EBFB43F3F; Fri, 5 Sep 2003 04:04:40 -0700 (PDT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at (wombat.fafoe.narf.at [192.168.2.102]) by fafoe.narf.at (Postfix) with ESMTP id 9EC043FA9; Fri, 5 Sep 2003 13:04:34 +0200 (CEST) Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 7C63A5E; Fri, 5 Sep 2003 13:04:32 +0200 (CEST) Date: Fri, 5 Sep 2003 13:04:32 +0200 From: Stefan Farfeleder To: Dan Nelson Message-ID: <20030905110426.GO94742@wombat.fafoe.narf.at> Mail-Followup-To: Dan Nelson , netchild@freebsd.org, current@freebsd.org References: <20030904180448.021a1b6b.Alexander@Leidinger.net> <20030904162858.GI98381@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030904162858.GI98381@dan.emsphone.com> User-Agent: Mutt/1.5.4i cc: netchild@freebsd.org cc: current@freebsd.org Subject: Re: Question about genassym, locore.s and 0-sized arrays (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 11:04:43 -0000 On Thu, Sep 04, 2003 at 11:28:58AM -0500, Dan Nelson wrote: > In the last episode (Sep 04), Alexander Leidinger said: > > - If we depend on it: how hard would it be to rewrite it to not depend > > on 0-sized arrays (and does someone volunteer to rewrite it)? It > > would be nice if someone could point me to the source if it isn't > > an easy task, my contact @Intel is willing to convince the > > developers to change icc, but he has to "present a persuasive > > argument to development to pursue a solution". > > 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: But even with flexible array members you cannot create an object with size 0. The struct must have at least one additional member and you cannot use sizeof on the flexible array member itself as its type is incomplete. Cheers, Stefan