diff options
author | Roland McGrath <roland@gcc.gnu.org> | 1992-05-28 20:30:28 +0000 |
---|---|---|
committer | Roland McGrath <roland@gcc.gnu.org> | 1992-05-28 20:30:28 +0000 |
commit | 51041a8937f4576cbe78ab764618e72b94feb50c (patch) | |
tree | d9848e0b84a49f58880da0a4612477897188a9b8 | |
parent | 7c546c94de5d0b784b8c3b44d5ec2d4bf88cec4c (diff) | |
download | gcc-51041a8937f4576cbe78ab764618e72b94feb50c.zip gcc-51041a8937f4576cbe78ab764618e72b94feb50c.tar.gz gcc-51041a8937f4576cbe78ab764618e72b94feb50c.tar.bz2 |
entered into RCS
From-SVN: r1116
-rw-r--r-- | gcc/README.TRAD | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/gcc/README.TRAD b/gcc/README.TRAD new file mode 100644 index 0000000..07ccd16 --- /dev/null +++ b/gcc/README.TRAD @@ -0,0 +1,55 @@ +This is a partial list of how `gcc -traditional' disagrees with +traditional C compilers (perhaps only some of them). Most of these +differences are not bugs. + +--------------------------------------------------------------------------- +K&R-1 (2.4.3) says: + + "If the character following a backslash is not one of those + specified {in the table above}, the backslash is ignored." + +Up until recently, `gcc -traditional' complained about \x \a and \v +appearing in a character or string literal. I believe however that +this non-feature has been eliminated (recently). + +--------------------------------------------------------------------------- +When in -traditional mode, gcc allows the following erroneous pair of +declarations to appear together in a given scope: + + typedef int foo; + typedef foo foo; + +--------------------------------------------------------------------------- +K&R-1 (8.5) says: + + "No field may be wider than a word." + +Gcc however allows: + + struct S { int i:33; }; + +--------------------------------------------------------------------------- +In K&R-1 there is no restriction against comments crossing include file +boundaries. Gcc however doesn't allow this, even when in -traditional mode. + +--------------------------------------------------------------------------- +Regarding the length of identifiers, K&R-1 (2.2) says: + + "No more than the first eight characters are significant, + although more may be used." + +Gcc treats all characters of identifiers as significant, even when in +-traditional mode. + +--------------------------------------------------------------------------- +K&R-1 (2.2) says: + + "An identifier is a sequence of letters and digits; the first + character must be a letter. The underscore _ counts as a letter." + +Gcc also allows dollar signs in identifiers. (This may also be an issue +for the -pedantic option.) + +--------------------------------------------------------------------------- + + |