Messages in this thread | | | From | (david parsons) | Subject | Re: bug in socket.h (and maybe many other kernel headerfiles) | Date | 17 Sep 1999 14:25:24 -0700 |
| |
In article <linux.kernel.Pine.LNX.3.95.990917152427.370A-100000@chaos.analogic.com>, Richard B. Johnson <root@chaos.analogic.com> wrote: >On Fri, 17 Sep 1999, Sean Hunter wrote: > > On Fri, Sep 17, 1999 at 11:48:34AM +0200, Dipl.-Ing. Uwe Koloska wrote: >> Hello, >> >> I am not on this list by post by told so in REPORTING-BUGS. >> >> By installing kde-1.1.2 with gcc-2.95.1 I noticed a wrong declaration in >> /usr/incluce/linux/socket.h:109 >> >> ANSI C++ forbids implicit conversion from `void *' in return >> >> The right ANSI way to do it is to return a literal "0". >> >> By taking a quick glance on the other headerfiles there are many places that >> uses NULL without explicit conversion. >> >> Maybe (adhearing to ANSI???) NULL has to be defined "0" and not (void*) ... >> > >The kernel code is written in C. C requires that NULL be defined as >(void *)0.
Is this a C9x thing? It's handy that GNU casts NULL to (void*)0, but I don't think pre-9x C requires that sizeof(NULL) == sizeof(void*).
____ david parsons \bi/ Though there ARE ifdefs, so c++ should STFU. \/
- 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/
| |