Annotation of gcc/README.trad, revision 1.1.1.1

1.1       root        1: This is a partial list of how `gcc -traditional' disagrees with 
                      2: traditional C compilers.
                      3: 
                      4: ---------------------------------------------------------------------------
                      5: K&R-1 (2.4.3) says:
                      6: 
                      7:        "If the character following a backslash is not one of those
                      8:        specified {in the table above}, the backslash is ignored."
                      9: 
                     10: Up until recently, `gcc -traditional' complained about \x \a and \v
                     11: appearing in a character or string literal.  I believe however that
                     12: this non-feature has been eliminated (recently).
                     13: 
                     14: ---------------------------------------------------------------------------
                     15: When in -traditional mode, gcc allows the following erroneous pair of
                     16: declarations to appear together in a given scope:
                     17: 
                     18:        typedef int foo;
                     19:        typedef foo foo;
                     20: 
                     21: ---------------------------------------------------------------------------
                     22: K&R-1 (8.5) says:
                     23: 
                     24:        "No field may be wider than a word."
                     25: 
                     26: Gcc however allows:
                     27: 
                     28:        struct S { int i:33; };
                     29: 
                     30: ---------------------------------------------------------------------------
                     31: In K&R-1 there is no restriction against comments crossing include file
                     32: boundaries.  Gcc however doesn't allow this, even when in -traditional mode.
                     33: 
                     34: ---------------------------------------------------------------------------
                     35: Regarding the length of identifiers, K&R-1 (2.2) says:
                     36: 
                     37:        "No more than the first eight characters are significant,
                     38:        although more may be used."
                     39: 
                     40: Gcc treats all characters of identifiers as significant, even when in
                     41: -traditional mode.
                     42: 
                     43: ---------------------------------------------------------------------------
                     44: K&R-1 (2.2) says:
                     45: 
                     46:        "An identifier is a sequence of letters and digits; the first
                     47:        character must be a letter.  The underscore _ counts as a letter."
                     48: 
                     49: Gcc also allows dollar signs in identifiers.  (This may also be an issue
                     50: for the -pedantic option.)
                     51: 
                     52: ---------------------------------------------------------------------------
                     53: 
                     54: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.