lkml.org 
[lkml]   [1999]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: C++ warnings from system header 'socketbits.h' : can we clean this up?
On Fri, Mar 12, 1999 at 10:34:19AM -0600, Ron Flory wrote:

<..>
> Basically the problem is due to an old C hack where folks
> assume the macro NULL evaluates to 0. In C++ NULL is defined
> as '(void*) 0' which is quite distinct from zero, and may not
> be freely converted to an integer.

<..>

> /usr/include/socketbits.h: In function `struct cmsghdr *
> __cmsg_nxthdr(struct msghdr *, struct cmsghdr *)':

<..>


Wrong mailing list. That particular include file is part of libc, not of the
kernel. As a side note i dont understand how ANSI C++ can allow an implicit
conversion of a literal integer to a pointer to a struct, but not a void
pointer to a pointer to a struct. This also implies all code which should
return pointers and do 'return NULL;' are now to be considered broken (in
C++), which, quite frankly, scares me. Are you sure this is the problem ?
(Also, take a look at your libc, libc5/libc6/whatever, and bug its authors :-)

Regards,
Thomas.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.052 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site