On Tue, Apr 28, 2015 at 06:10:33PM -0600, Jeff Law wrote: > On 04/26/2015 07:09 PM, Josh Triplett wrote: > >handle_section_attribute contains many levels of nested conditionals and > >branching code flow paths, with the error cases sometimes in the else > >case and sometimes in the if case. Simplify the code flow into a series > >of potential failure cases ending with the successful path, with no > >nesting and no else clauses. > >--- > > > >I do not have commit access; if you approve, please commit. > > > >This cleanup will help enable a larger patch enhancing the section attribute. > > > >gcc/Changelog entry: > > > >2014-08-24 Josh Triplett <j...@joshtriplett.org> > > > > * c-family/c-common.c (handle_section_attribute): Refactor to reduce > > nesting and distinguish between error cases. > Have you done a bootstrap and regression test with this patch? While I > don't expect problems, it's part of the standard procedure for patch > submissions. > > There may be tests which look for "section_attribute note allowed for ..." > in the !STRING_CST case that will have a different error message after your > change. If so, they will need to be adjusted. > > I'll approve and commit once you've verified the bootstrap & regression test > was OK.
Yes, I've done a full bootstrap and regression test without issue. There don't appear to be any tests that rely on the text of any of those error messages. - Josh Triplett