This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: EGCS-19990502 and ANSI C


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]