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: Coding standards (was treelang patch)


Geoff Keating wrote:

> * It seems to have many lines that are > 80 characters, and your
>   posting program word-wrapped it---this is two problems in one, since
>   generally source lines should be less than 80 characters, as well as
>   the word-wrapping.

Point taken about the wrapping. I have changed the option in my email  client.

I have been surruptitiously working on a program, called pedant, which checks for compliance with the coding standard.

I was under the impression that 80 character lines were the limit, so I coded the test into pedant. But when I went looking for scriptural authority in the FSF or GCC coding standards, I couldn't find
anything that says there is a line size limit.

There should be such a limit IMHO. Perhaps it should be added to the GCC coding conventions document.

By the way there are over 1600 instances of long lines in gcc/*.[chly] at the moment. Only a few are in generated code.

I was also under the impression that one should not use tabs in GCC programs. Again I could find no authority for this point (over a hundred thousand instances of this, so maybe I made that one up).

I also note that the spacing requirement is only a recommendation.

e.g.
    x = y + z;
rather than
    x=y+z;

The comments I received about spacing suggested that it was more than that!

Tim Josling


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