Re: [PATCH] Fix Gold/strip discrepancies for PR 11786

Jan Kratochvil
2013-11-05T17:22:36Z

On Tue, 05 Nov 2013 18:04:38 +0100, Doug Evans wrote:
> I'm not sure how to read this.

Primarily I do not understand if you really defend "()". "()" is wrong and
obsolete syntax. Reason is that it does not check against passed parameters,
making bugs more difficult to catch and therefore the code expensive to
maintain.

The real bug is that gdb/testsuite/ does not use the same CFLAGS like gdb/
does, including -Wmissing-prototypes.

It would be nice to enable it there one day. But nowadays nobody is going to
fix all the gdb/testsuite/ sources to make them compliant. But it is not
right to (1) make the testsuite code more expensive to maintain,
(2) needlessly different from the main GDB codebase code, (3) making the
future work of enabling -Wmissing-prototypes for gdb/testsuite/ more expensive
(if it ever happens).

> It's ok by me, but it seems to me it's not a requirement today as
> there are plenty of existing examples,

Any existing code should be irrelevant, existing GDB code base is in a worse
state than what should be required for new commits.

> including recent ones.

This is worse, I am aware of it. Just I do not want to spend more time
catching such nitpicks when GDB has in several orders of magnitude more
serious problems. Discussing such a clear thing like that "()" is forbidden
seems also as a loss of time to me. C++ even does not know K&R prototype
anymore so it will not even be possible in GDB anymore in some time,
hopefully.

Jan