From owner-freebsd-current@FreeBSD.ORG Sat Sep 6 01:32:19 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 B7F6916A4BF for ; Sat, 6 Sep 2003 01:32:19 -0700 (PDT) Received: from mailout03.sul.t-online.com (mailout03.sul.t-online.com [194.25.134.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5182E43FBD for ; Sat, 6 Sep 2003 01:32:17 -0700 (PDT) (envelope-from Alexander@Leidinger.net) Received: from fwd06.aul.t-online.de by mailout03.sul.t-online.com with smtp id 19vYU6-0004m0-04; Sat, 06 Sep 2003 10:31:54 +0200 Received: from Andro-Beta.Leidinger.net (SarPd4ZO8eaaElQn2X5bCFt5ot+cpzTHagntc8KdxB4EttefyABjQB@[217.83.31.47]) by fmrl06.sul.t-online.com with esmtp id 19vYTu-0cbzmq0; Sat, 6 Sep 2003 10:31:42 +0200 Received: from Magelan.Leidinger.net (Magelan [192.168.1.1]) h868Wju8000528; Sat, 6 Sep 2003 10:32:45 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magelan.Leidinger.net (netchild@localhost [127.0.0.1]) by Magelan.Leidinger.net (8.12.9/8.12.9) with SMTP id h868XYIo000901; Sat, 6 Sep 2003 10:33:34 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Sat, 6 Sep 2003 10:33:34 +0200 From: Alexander Leidinger To: Marcel Moolenaar Message-Id: <20030906103334.0f3233aa.Alexander@Leidinger.net> In-Reply-To: <20030905165557.GB566@dhcp01.pn.xcllnt.net> References: <20030904180448.021a1b6b.Alexander@Leidinger.net> <20030904162858.GI98381@dan.emsphone.com> <20030905001411.3a9030b3.Alexander@Leidinger.net> <20030904225123.GB39916@dan.emsphone.com> <3F584B85.AAC3A11D@mindspring.com> <20030905105507.51ba3183.Alexander@Leidinger.net> <20030905165557.GB566@dhcp01.pn.xcllnt.net> X-Mailer: Sylpheed version 0.9.3claws (GTK+ 1.2.10; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Seen: false X-ID: SarPd4ZO8eaaElQn2X5bCFt5ot+cpzTHagntc8KdxB4EttefyABjQB@t-dialin.net cc: Dan Nelson 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: Sat, 06 Sep 2003 08:32:19 -0000 On Fri, 5 Sep 2003 09:55:57 -0700 Marcel Moolenaar wrote: > Interesting, What does icc do with: > > struct { > int tag; > char obj[]; > } foo; > > And what does the sizeof() operator give. ---snip--- % struct { int tag; char obj[]; } foo; int main(void) { struct foo bar; printf("%d\n", sizeof(struct foo)); printf("%d\n", sizeof(bar)); return 0; } % icc marcel.c marcel.c(9): error: incomplete type is not allowed struct foo bar; ^ marcel.c(11): warning #70: incomplete type is not allowed printf("%d\n", sizeof(struct foo)); ^ compilation aborted for marcel.c (code 2) % struct { int tag; char obj[]; } foo; int main(void) { printf("%d\n", sizeof(struct foo)); return 0; } % icc marcel.c marcel.c(9): warning #70: incomplete type is not allowed printf("%d\n", sizeof(struct foo)); ^ % ./a.out 0 ---snip--- Bye, Alexander. -- Loose bits sink chips. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7