This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [c++-concepts] code review
- From: Oleg Endo <oleg dot endo at t-online dot de>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Andrew Sutton <andrew dot n dot sutton at gmail dot com>, Gabriel Dos Reis <gdr at integrable-solutions dot net>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 09 Jun 2013 22:34:49 +0200
- Subject: Re: [c++-concepts] code review
- References: <CANq5Syt5s-NgazOYbT5wtYSRsbZUqcivoer1w4jiucx5qYKMfA at mail dot gmail dot com> <CAAiZkiAn9rpPmPKXztUA4rd3CH6w3=tn7jz=oksk65Ypx6RpGg at mail dot gmail dot com> <51B0B0ED dot 5090508 at redhat dot com> <CANq5SystWWs=AOAYAHmRjfx17itDrYQj+GtdUr=-XYGLV_4=6g at mail dot gmail dot com> <51B0F122 dot 6020301 at redhat dot com>
On Thu, 2013-06-06 at 16:29 -0400, Jason Merrill wrote:
> On 06/06/2013 01:47 PM, Andrew Sutton wrote:
> > I never did understand why this happens. Compiling with GCC-4.6, I get
> > these errors originating in logic.cc from an include of <algorithm>.
> > This is what I get:
> >
> > /usr/include/c++/4.6/cstdlib:76:8: error: attempt to use poisoned "calloc"
>
> Ah, I see: adding the include gets the mentions of malloc in before the
> names are poisoned. This change is OK.
>
I ran into the same issue when I started using C++ std:: stuff in the SH
backend code last year. I posted a patch, but somehow it didn't go
anywhere...
http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00880.html
The workaround was to include <cstdlib> as the first include in sh.c.
Would it be possible to have the change above also in trunk?
Cheers,
Oleg