bug-standards
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Some suggested corrections to the standards document


From: Eugene Y. Vasserman
Subject: Some suggested corrections to the standards document
Date: Mon, 6 Nov 2006 11:02:15 -0600
User-agent: Mutt/1.5.11

Hi,
I've been reading the GNU coding standards, and I think I have some ways to 
make certain things clearer.

1. You frequently refer to RAM as core. I think this is an outdated term, and 
many modern programmers may not know what it means. I would suggest replacing 
core with RAM or main memory.

2. In section 5.6, there is a short bit of text:
Don't assume that the address of an int object is also the address of its 
least-significant byte. This is false on big-endian machines. Thus, don't make 
the following mistake:

     int c;
     ...
     while ((c = getchar()) != EOF)
       write(file_descriptor, &c, 1);

a. You may want to change the code to be GNU coding standards complient (as per 
section 5.3) other than the bug being demonstrated, otherwise the reader may be 
confused. So, the code in question should be:
     int c;
     ...
          c = getchar();
     while (c != EOF)
          {
       write(file_descriptor, &c, 1);
            c = getchar();
     }
Thus the bug in question is preserved, and the code does not confuse the user 
about other standards.

b. It would be good to include the correct way of doing what the code should be 
doing. This way, the reader may learn better from this example. :)

Thanks,
Eugene

-- 
Eugene Y. Vasserman
http://www.cs.umn.edu/~eyv/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]