This is the mail archive of the
mailing list for the GCC project.
Re: Using C++ - Problem with <cstdlib>
- From: Ian Lance Taylor <iant at google dot com>
- To: Oleg Endo <oleg dot endo at t-online dot de>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Sat, 25 Aug 2012 13:40:27 -0700
- Subject: Re: Using C++ - Problem with <cstdlib>
- References: <1345926440.2398.17.camel@yam-132-YW-E178-FTW>
On Sat, Aug 25, 2012 at 1:27 PM, Oleg Endo <email@example.com> wrote:
> I'm currently playing around with an RTL pass and started using C++.
> When including <algorithm> I get the following:
> /usr/include/c++/4.6/cstdlib:76:8: error: attempt to use poisoned
> /usr/include/c++/4.6/cstdlib:83:8: error: attempt to use poisoned
> /usr/include/c++/4.6/cstdlib:89:8: error: attempt to use poisoned
> It seems the story is old:
> Now that the switch to C++ has been made, how should this be handled?
Add #include <cstdlib> to system.h, right by, or perhaps replacing,
the #include <stdlib.h>.