On Mon, Jan 04, 2016 at 06:18:32PM -0700, Martin Sebor wrote: > I've fixed the problems you pointed out in the attached patch. > The typos are my bad. As for the whitespace, I have to confess > I'm finding all the rules tedious to follow without some sort > of automation. Jason suggested some option to git but I don't > use git to commit (too many other problems). I'm also not sure > the option makes Git replace 8 spaces with TABs. I tried to > have my Emacs automatically strip trailing whitespace for me > but that was causing spurious changes on otherwise untouched > lines that already contain it (clearly, I'm not the only who > struggles with whitespace). I don't suppose everyone is > voluntarily subjecting themselves to this torture so there > must be a way to make it less onerous and painful. What's > your secret?
I agree that the rules are sometimes tedious to follow (and rebasing patches just to fix some formatting issues isn't exactly fun). I don't use git to commit either. My "secret" is to enable highlighting of trailing whitespaces in vim ("let c_space_errors=1"), but that's of no use to you I guess. But there's this contrib/check_GNU_style.sh script that you can use, which points out e.g. 8 spaces -> tabs. Before posting a patch, I always do 'check_GNU_style z.patch'. That might help. > Index: gcc/c-family/c-common.c > =================================================================== > --- gcc/c-family/c-common.c (revision 232047) > +++ gcc/c-family/c-common.c (working copy) > @@ -7804,7 +7804,7 @@ > else if (TYPE_P (*node)) > type = node, is_type = 1; > > - if ((i = check_user_alignment (align_expr, false)) == -1 > + if ((i = check_user_alignment (align_expr, true)) == -1 > || !check_cxx_fundamental_alignment_constraints (*node, i, flags)) > *no_add_attrs = true; > else if (is_type) This change is unrelated. Marek