This is the mail archive of the gcc@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: Fixing Bugs (Was: A Suggestion for Release Testing)


Scott Robert Ladd wrote:

The ISO Standard doesn't prevent GCC from being *better* than specified,
does it? Are we somehow breaking ISO compliance by doing math right? Is
it so wrong to try and fix a problem that frustrates many people and
makes GCC look bad?

No, but you are degrading performance unnecessarily by doing math to conform to the Scott-Ladd standard, and we are not implementing SL C we are implementing ISO C :-)

Of course it is perfectly reasonable to have well chosen options to
do more or less than the standard requires.

With the attitude shown by Giovanni, there's really no point in submitting a patch, is there? Dozens of people have reported this problem, potential solutions exist, but any patch is going to be ignored because the bug isn't considered a bug by the Powers That Be.

It would be quite wrong to patch this unconditionally. The proper patch would be one that provided a switch and a well defined semantics for the switch, but this needs very careful design, and careful review by people who understand fpt well.

If I were to present a patch that implements the recomendations of the Numerical C Extensions Group, would it be accepted or rejected (on the subject alone; ignore for the moment potential technical bugs in the submitted code)?

Again, it would probably be better submitted under a switch. For example on a machine like the Alpha, the impact of following these recomendations is severe degradation of performance.

Documentation for the compiler itself is woefully inadequate for someone "new". GCC may be old-hat to folks who've worked on it for years, but it is very complex and foreign territory for most non-compiler experts. Working on GCC requires a much broader knowledge than working on other projects, and without some sort of tutorial or guidance, working on it quickly becomes frustrating.

Compilers are complex beasts, I don't think you would expect to be able to wade in and fix nuclear reactors without being somewhat of a nuclear reactor expert. You can't expect to wade in and fix compilers without being reasonably compiler literate. For those who are compiler literate, GCC is certainly accessible. Sure, it could be made more accessible, principally by adding more documentation. Patches to add correct useful additional documentation are definitely welcome.

Here's an example: Building new targets and fixing some code generation bugs involve changing the machine definitions, which are written in a rather uncommon language. Frankly, I haven't figured out all the nuances yet, mostly because I don't have the luxury of studying it, and I can't find any clear and comprehensive documentation.

These definitions are actually very clear, certainly they could not be written in some normal programming language since they are essentially denotational semantic definitions, for which a language like C would be perfectly horrible. You need to invest the effort to fully understand the machine definition language before you can do anything in this area, and it is hard to see how it could be otherwise.

Gentoo provides a mentoring system for developers. This is far better than GCC's "fix it yourself and send us the code" policy. There is no gentle way to become involved in GCC; it's a sink-or-swim, trial by fire environment. If I could get a half-dozen quick questions answered, and I could submit a couple of patches that are lying about on my hard drive.

There is no gentle way to become involved in any compiler, they are complex beasts, and require a considerable investment of effort.

I have submitted patches; I have tried to help with various aspects of
GCC. I make no claim to having accomplished anything great, but I have
tried, and watched patches die of bit rot while being told that certain
bugs shouldn't be fixed.

I know of no bug (i.e. behavior non-conformant with ISO C) that someone has said should not be fixed.

Everything in life is a matter of give and take. People report bugs; you want someone to fix the bugs -- perhaps GCC should be more welcoming and helpful.

ANything to make it more welcoming and helpful is of course desirable, but I think you are expecting too much if you expect an artifact of this inherent complexity to be easily accessible, especially to people without reasonably comprehensive training (i.e. at least a familiarity with compilers at the dragon book level, and reading some of the crucial papers in the area).


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