This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Plan for removing global state from GCC's internals


On Tue, Jul 2, 2013 at 3:25 PM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Mon, 1 Jul 2013, Aaron Gray wrote:
>
>> I started to do this starting with the C++ parser class'izing it but
>> no one was interested.
>
> The C++ parser types such as cp_parser and cp_lexer already do a good job
> of avoiding global state.

The assertion that nobody was interested is, of course, untrue.
I did give feedback; but I never heard back after that.


>
> I am not an expert on good C++ coding practices and don't know to what
> extent the objections given in
> <http://gcc.gnu.org/ml/gcc-patches/2012-08/msg02019.html> might apply to
> any parts of David's proposal.  But in David's proposal, conversion to
> classes is a means to an end - eliminating global state through passing
> implicit "this" pointers - and not an end in itself if the global state
> does not exist, or if it can easily be moved inside an existing structure
> such as cp_parser or gcc_options rather than needing to go inside some new
> class.

Amen.


-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]