public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Pedro Lamarão" <pedro.lamarao@ccppbrasil.org>
To: Richard Guenther <richard.guenther@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: [gcc-in-cxx] replacing qsort with std::sort
Date: Wed, 12 Aug 2009 14:33:00 -0000	[thread overview]
Message-ID: <15727b460908120612j6935a63clc19dd7172e28bcff@mail.gmail.com> (raw)
In-Reply-To: <84fc9c000908120146n5058f07dpef15ef1492115ae0@mail.gmail.com>

2009/8/12 Richard Guenther <richard.guenther@gmail.com>:

> On Wed, Aug 12, 2009 at 2:03 AM, Pedro
> Lamarão<pedro.lamarao@ccppbrasil.org> wrote:
>> I've recently started my contributions to the gcc-in-cxx project, and
>> eventually decided on the qsort suggestion because it seems the
>> easiest one.
>> I've made the change in three places in cp/classes.c; the patch can be
>> found here:
>>
>>   http://code.google.com/p/ccppbrasil/wiki/GccInCxx
>>
>> Is this the way to go?
>
> Please attach patches in the future.


Sorry.
I thought policy on this list was against attachments.


> +#include <algorithm>
> +
>  #include "config.h"
>  #include "system.h"
>
> The includes need to come after config.h and system.h at least.


I agree, but including <algorithm> last causes many "poisoned"
warnings that I don't understand -- using names like "calloc".


>> Also, std::sort requires a "less" function on reference-tovalue-type,
>> so the current foo_cmp functions can't be reused.
>> Would a separate patch to introduce foo_less variants be acceptable
>> for GCC 4.5 right now?
>
> No, I don't see the need for them.


I'll maintain these changes elsewhere, then.
Will GCC ever require support for both a C and a C++ compiler at the same time?
If it is reasonable to assume a C++ compiler things become easier for me.

--
 P.

  reply	other threads:[~2009-08-12 13:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-12  9:59 Pedro Lamarão
2009-08-12 13:12 ` Richard Guenther
2009-08-12 14:33   ` Pedro Lamarão [this message]
2009-08-12 13:21 ` Ian Lance Taylor
2009-08-29 11:26 ` Pedro Lamarão
2009-08-29 19:42   ` Magnus Fromreide
2009-08-30 10:37     ` Pedro Lamarão
2009-08-31 16:10       ` Richard Henderson
2009-08-31 16:18         ` Pedro Lamarão
2009-08-31 18:36           ` Richard Henderson
2009-08-31 18:54             ` Richard Guenther
2009-08-31 19:01               ` Richard Henderson
2009-08-31 19:06   ` Pedro Lamarão
2009-09-02  0:24     ` Michael Matz
2009-09-02 12:57       ` Pedro Lamarão

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15727b460908120612j6935a63clc19dd7172e28bcff@mail.gmail.com \
    --to=pedro.lamarao@ccppbrasil.org \
    --cc=gcc@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).