Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NODrc-0000V0-Ku for mharc-grub-devel@gnu.org; Fri, 25 Dec 2009 12:22:08 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NODrb-0000TY-EB for grub-devel@gnu.org; Fri, 25 Dec 2009 12:22:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NODrV-0000Kw-EH for grub-devel@gnu.org; Fri, 25 Dec 2009 12:22:06 -0500 Received: from [199.232.76.173] (port=35979 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NODrV-0000K1-4K for grub-devel@gnu.org; Fri, 25 Dec 2009 12:22:01 -0500 Received: from moutng.kundenserver.de ([212.227.17.9]:63326) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NODrU-00041Z-84 for grub-devel@gnu.org; Fri, 25 Dec 2009 12:22:00 -0500 Received: from [85.180.33.184] (e180033184.adsl.alicedsl.de [85.180.33.184]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0LkBS6-1O02ij1kBm-00bcSj; Fri, 25 Dec 2009 18:21:59 +0100 From: Felix Zielcke To: The development of GNU GRUB In-Reply-To: <20091224215526.GQ12122@thorin> References: <20091224215526.GQ12122@thorin> Content-Type: text/plain; charset="UTF-8" Date: Fri, 25 Dec 2009 18:21:58 +0100 Message-ID: <1261761718.3156.15.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.29.3.2 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1/DCPMsW2I5YaykwZUcwVKaS0PYhNZjdP+q4W/ PJl6A2BoFUDAtJWlzdzdWvoQFWmZthTI7wdpi5AAjj+i2OA2F+ 93KTdvzuHA1p6TUqo0XuxrlCIZmZ9cl X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: Fix for grub_assert_fail undefined on NetBSD and other platforms X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Dec 2009 17:22:07 -0000 Am Donnerstag, den 24.12.2009, 22:55 +0100 schrieb Robert Millan: > On Tue, Dec 22, 2009 at 09:39:07PM +0530, BVK Chaitanya wrote: > > Hi > > > > > > Attached is the patch, which removes use of undefined > grub_assert_fail > > function for catching bad-type-cast errors, with a better version > > __attribute__((error("msg"))) gcc extension. With this extension, > gcc > > can give the exact location of the bad type cast at compile time. > > Is this really a kind of error we'd like to report at run time? Sorry > if > I'm missing something, but if we need additional code to handle it, > and it > was known at compile time, why do we do this? __attribute__ ((error)) still reports it at compile time just like the old grub_assert_fail method. But the advantage is that you can specify the error message instead of just getting a `ld: unknown symbol grub_assert_fail' error during linking. And as BVK said above also the exact location where this happened. -- Felix Zielcke Proud Debian Maintainer and GNU GRUB developer