This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using stl containers in gcc
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Andres Tiraboschi <andres dot tiraboschi at tallertechnologies dot com>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Tue, 3 May 2016 17:02:26 +0200
- Subject: Re: Using stl containers in gcc
- Authentication-results: sourceware.org; auth=none
- References: <CAJZwELk_0K4a_hEx1V=W0dOxKjDo7nfa4W0mdeO-Y2m7Pv1URQ at mail dot gmail dot com> <0a7b0410-73b6-b7f0-681f-bbca637f4a2d at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, May 03, 2016 at 08:59:11AM -0600, Jeff Law wrote:
> On 05/03/2016 08:44 AM, Andres Tiraboschi wrote:
> >Hi,
> >Does anyone know if there is a good reason for not using stl
> >containers in gcc sources?
> >I'm asking because I didn't find any use of them in the code I read.
> The GCC coding conventions allow the use of the standard library; but you
> have to be careful WRT objects that are subject to garbage collection.
And, if there is a GCC counterpart of a particular container, the GCC
counterpart should be used instead of the stl one.
E.g. vec, or hash_map etc.
Jakub