2009/8/12 Richard Guenther <richard.guent...@gmail.com>: > On Wed, Aug 12, 2009 at 2:03 AM, Pedro > Lamarão<pedro.lama...@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.