This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] dead const/pure/alloca call removal
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Michael Matz <matz at suse dot de>
- Cc: Jason Merrill <jason at redhat dot com>, Daniel Jacobowitz <drow at mvista dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: 10 Nov 2003 05:02:49 +0100
- Subject: Re: [tree-ssa] dead const/pure/alloca call removal
- Organization: Integrable Solutions
- References: <Pine.LNX.email@example.com>
Michael Matz <firstname.lastname@example.org> writes:
| On 9 Nov 2003, Gabriel Dos Reis wrote:
| > | Why do you see this as different from strlen?
| > memory allocation is fundamentally different from counting the number
| > of characters in a string.
| This is an interesting statement from a language lawyer.
Thank you for the qualification, but I wasn't considering myself as
being qualified enought for that elevation. Where can I come and take
| How exactly have
| you measured that difference, and why is it fundamental, and why is
| malloc() on the we-shouldn't-do-this side, but not strlen()?
It is simply a statement of fact.
If you look at the way the C++ standard library works, you'll notice
that it handles storage allocation differently from other standard
algorithms like count_if or find. I suppose that is no enough
evidence for you to acknowledge the difference.
| No no, you are wrong.
No more wrong than you. I base my argumentation on existing practice
and ways memory allocation is perceived in the C++ community.
| Btw. in case this was already forgotten in this thread. The proposed
| patch only deleted alloca() calls (which btw. is provided by GCC, not that
| this would matter), and didn't deal with malloc/free at all.
That was not forgotten, but I suppose you missed the context of my
reply. Didn't you?