This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [tree-ssa] dead const/pure/alloca call removal


Michael Matz <matz@suse.de> writes:

| Hi,
| 
| 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
the diploma?

|  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?

-- Gaby



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