From owner-freebsd-current@FreeBSD.ORG Thu Sep 4 09:29:00 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 852A616A4C0; Thu, 4 Sep 2003 09:29:00 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7606043FBD; Thu, 4 Sep 2003 09:28:59 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h84GSwci074826; Thu, 4 Sep 2003 11:28:58 -0500 (CDT) (envelope-from dan) Date: Thu, 4 Sep 2003 11:28:58 -0500 From: Dan Nelson To: netchild@freebsd.org Message-ID: <20030904162858.GI98381@dan.emsphone.com> References: <20030904180448.021a1b6b.Alexander@Leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030904180448.021a1b6b.Alexander@Leidinger.net> X-OS: FreeBSD 5.1-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i 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: Thu, 04 Sep 2003 16:29:00 -0000 In the last episode (Sep 04), Alexander Leidinger said: > At the moment I discussing an issue with Intel regarding 0-sized > arrays. gcc seems to be violating the standard and produces code with > an array size of "0", whereas icc produces code where an 0-sized > array has the size "1". This results in different nm output of > genassym.o: [snip] > - 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: 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. -- Dan Nelson dnelson@allantgroup.com