From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7325 invoked by alias); 12 Aug 2009 13:12:35 -0000 Received: (qmail 7300 invoked by uid 22791); 12 Aug 2009 13:12:34 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SARE_SUB_OBFU_Q1 X-Spam-Check-By: sourceware.org Received: from mail-yx0-f200.google.com (HELO mail-yx0-f200.google.com) (209.85.210.200) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 Aug 2009 13:12:22 +0000 Received: by yxe38 with SMTP id 38so8424939yxe.0 for ; Wed, 12 Aug 2009 06:12:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.128.20 with SMTP id a20mr76399and.168.1250082740108; Wed, 12 Aug 2009 06:12:20 -0700 (PDT) In-Reply-To: <84fc9c000908120146n5058f07dpef15ef1492115ae0@mail.gmail.com> References: <15727b460908111703l682ab204l39700c8bfde50577@mail.gmail.com> <84fc9c000908120146n5058f07dpef15ef1492115ae0@mail.gmail.com> Date: Wed, 12 Aug 2009 14:33:00 -0000 Message-ID: <15727b460908120612j6935a63clc19dd7172e28bcff@mail.gmail.com> Subject: Re: [gcc-in-cxx] replacing qsort with std::sort From: =?ISO-8859-1?Q?Pedro_Lamar=E3o?= To: Richard Guenther Cc: gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-08/txt/msg00192.txt.bz2 2009/8/12 Richard Guenther : > On Wed, Aug 12, 2009 at 2:03 AM, Pedro > Lamar=E3o 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: >> >> =A0 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 > + > =A0#include "config.h" > =A0#include "system.h" > > The includes need to come after config.h and system.h at least. I agree, but including 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 t= ime? If it is reasonable to assume a C++ compiler things become easier for me. -- P.