Date: Mon, 19 Jan 1998 14:15:36 -0600 (CST) From: Joel Ray Holveck <joelh@gnu.org> 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 Subject: Re: FreeBSD Netcards Message-ID: <199801192015.OAA02265@detlev.UUCP> In-Reply-To: <199801191947.MAA05774@usr08.primenet.com> (message from Terry Lambert on Mon, 19 Jan 1998 19:47:18 %2B0000 (GMT)) References: <199801191947.MAA05774@usr08.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801192015.OAA02265>