This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: EGCS-19990502 and ANSI C
- To: "IronCode" <ironcode at bulnet dot bg>
- Subject: Re: EGCS-19990502 and ANSI C
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 12 May 1999 04:25:57 -0300
- Cc: <egcs-bugs at egcs dot cygnus dot com>
- References: <9905112259.AA25728@leff.bulnet.bg>
On May 11, 1999, "IronCode" <ironcode@bulnet.bg> wrote:
> EGCS-19990502 has problems with compiling C++ (with two pluses)
> The problem is that on line 109 of socket.h we have a "return NULL" in a
> function which should return (cmsghdr *).
> /usr/include/linux/socket.h:109: ANSI C++ forbids implicit conversion from
> `void *' in return
That's weird, because NULL shouldn't have type void* in the first
place; this is explicitly forbidden in the C++ Standard. I wonder if
there's not some hack to arrange that NULL is not defined to something
other than __null or 0 as it should...
> Isn't this a bug? I mean, this is not something for which a compilation
> should be refused, it should be a warning at most...
Nope, egcs is increasing its strictness so as to enforce better
programming practices. There is a new option to reduce the strictness
level, but I fail to remember its spelling right now.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists