This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Removing casts from code
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Roland McGrath <roland at redhat dot com>
- Cc: Ulrich Drepper <drepper at redhat dot com>, Art Haas <ahaas at airmail dot net>, libc-alpha at sources dot redhat dot com
- Date: 07 Jan 2003 06:28:40 +0100
- Subject: Re: Removing casts from code
- Organization: Integrable Solutions
- References: <200301070301.h0731qw10042@magilla.sf.frob.com>
Roland McGrath <roland@redhat.com> writes:
| > These changes are completely out of question. I want to have return
| > values of allocation functions casted to the correct type. Some code
| > you might want some day use with a C++ compiler and it also happened
| > several times that I changed malloc to alloca() in which can the cast is
| > sometimes needed.
|
| The code is C (post-1989 C), not C++.
Sure. But that does not mean they are not used in C++ components.
| If someday one actually uses some
| code as C++ source, then it will be worthwhile to add the casts as needed.
So, what does removing the cast brings us? I see nothing, if not
gratuitous incompatibility.
Please don't do the removals you're planing, they are counter-productive.
-- Gaby