This is the mail archive of the gcc-patches@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: PING [PATCH] enable -fprintf-return-value by default


On 11/18/2016 11:52 AM, Martin Sebor wrote:

I think it would be be ideal if all the options were sorted the same
way in all sections.  Is there some command to have texinfo sort them
for us?  If not, can we write a script to sort them, either each time
just before generating the docs or manually?  (I'm happy to help.)
Otherwise, consistency will continue to be an elusive goal.
I'm not aware of texinfo way to do this automatically.



There are at least two reasons why I don't think following the style
used by each section is likely to yield good results (and clearly
hasn't to date).  First, the big sections already have examples of
both approaches (or simply options out of order).  In some of them
it can also be hard to tell if the radix of the options you're
looking to for guidance starts with an 'n'.  Second, when adding
more than one option to different sections (such as the
-Wformat-length and -fprintf-format-length options) having to
remember to apply a different sort order for each (warnings are
sorted by radix but optimization options, for the most parts,
strictly alphabetically), seems also likely to trip people up.
Let's split this issue off by moving the option into the location Sandra has asked so that we're at least kindof, sorta, locally consistent. That allows your patch to go forward.

Then separately we can see if we can bring more sense to the larger issue. Sandra has tried to work towards bring sanity to our documentation (which has grown like field bindweed over time) and we can include a discussion about this issue in that larger effort.


PS I don't mind moving the -fno-printf-return-value option up or
down and I will do it before committing the patch.  I would just
prefer to be able not to have to remember and worry about all
these subtle rules.  There are too many of them and they tend
to take time and energy away from things that matter more (like
fixing bugs).
Understood. But that's also part of the reason why we delegate things -- there's a million little things to remember and nobody can remember them all. So it's a balance between saying "we should clean this up and bring consistency here now" and "the maintainer has asked for a change, let's do that and address the consistency issues separately".

There's obviously pros and cons to each decision which I don't enumerate ;-)

Jeff


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