From owner-freebsd-hackers Mon Jan 19 12:31:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA14732 for hackers-outgoing; Mon, 19 Jan 1998 12:31:03 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from wcc.wcc.net (wcc.wcc.net [208.6.232.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA14695 for ; Mon, 19 Jan 1998 12:30:34 -0800 (PST) (envelope-from piquan@wcc.wcc.net) Received: from detlev.UUCP (newip18.wcc.net [206.104.247.18]) by wcc.wcc.net (8.8.7/8.8.7) with ESMTP id OAA08699; Mon, 19 Jan 1998 14:12:26 -0600 (CST) Received: (from joelh@localhost) by detlev.UUCP (8.8.8/8.8.7) id OAA02265; Mon, 19 Jan 1998 14:15:36 -0600 (CST) (envelope-from joelh) Date: Mon, 19 Jan 1998 14:15:36 -0600 (CST) Message-Id: <199801192015.OAA02265@detlev.UUCP> To: tlambert@primenet.com CC: dag-erli@ifi.uio.no, tlambert@primenet.com, asami@cs.berkeley.edu, jamie@itribe.net, jdevale@ece.cmu.edu, hackers@FreeBSD.ORG In-reply-to: <199801191947.MAA05774@usr08.primenet.com> (message from Terry Lambert on Mon, 19 Jan 1998 19:47:18 +0000 (GMT)) Subject: Re: FreeBSD Netcards From: Joel Ray Holveck Reply-to: joelh@gnu.org References: <199801191947.MAA05774@usr08.primenet.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk > It is my argument that the compiler should issue warnings for > undefined behaviours. After all it is *supposedly* a C compiler, > and thus *supposedly* has knowledge of the standards hard-coded into > it. That would be very difficult and slow to handle in general, and frequently undesirable. For this case, the behaviour you desire can be obtained by replacing #define NULL 0 with #ifdef __STDC__ #define NULL ((void*)0) #else #define NULL ((char*)0) #endif > As is wheter or not the "evaluation" you reference is run time or compile > time. If it is compile time, then again, it makes sense to warn about > the conversion of a pointer type to a non-pointer type. Here I agree. I just gave you a solution. If you want a diff to commit instead, I'll send it to you. > Further, I stated "NULL valued string", not "NULL string". While > this is subject to interpretation, in context it was pretty obvious > that it could mean only one thing and continue to make sense. So then why propogate this argument over semantics? If you are genuinely concerned about the behaviour, then I'll send you a diff to commit. Cheers, joelh -- Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped