+1 On Wednesday, August 13, 2014, Andreas Sandberg via gem5-dev < [email protected]> wrote:
> Hi Everyone, > > I have a change I'd like to make to the gem5 coding style that I believe > will improve our code quality. > > Currently, the gem5 coding style mandates that includes are grouped four > different blocks (alphabetical ordering within a block): > > * Python headers > * C system/stdlib includes > * C++ stdlib includes > * M5 includes > > I propose that we change this to include an object's main header file > first (e.g., foo.cc would include foo.hh first). This ensures that the > header file does not depend on include file ordering and avoids > surprises down the road when someone tries to reuse code. This kind of > include file ordering is pretty common and is used at, for example, > Google [1]. > > Comments/ideas? > > If everyone is happy with this change, I'll go ahead and post a patch > for the style checker and update the Wiki. In order to keep the code > base reasonably stable, I propose that we only apply this to new code > and gradually migrate the old code. > > Thanks, > Andreas > > [1] > http://google-styleguide.googlecode.com/svn/trunk/ > cppguide.xml#Names_and_Order_of_Includes > > > -- IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended > recipient, please notify the sender immediately and do not disclose the > contents to any other person, use it for any purpose, or store or copy the > information in any medium. Thank you. > > ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, > Registered in England & Wales, Company No: 2557590 > ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, > Registered in England & Wales, Company No: 2548782 > > _______________________________________________ > gem5-dev mailing list > [email protected] > http://m5sim.org/mailman/listinfo/gem5-dev > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
