diff options
| author | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-15 04:18:47 +0000 |
|---|---|---|
| committer | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-15 04:18:47 +0000 |
| commit | f2fbb03c56a8cca45e8be218f071db06591fa911 (patch) | |
| tree | 6466798fe934097e747d92267fe4bdf6a10a1852 | |
| parent | e904ac081d24d8dd85a7158615615e8040bcf279 (diff) | |
| download | ppe42-gcc-f2fbb03c56a8cca45e8be218f071db06591fa911.tar.gz ppe42-gcc-f2fbb03c56a8cca45e8be218f071db06591fa911.zip | |
update portability guide
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35041 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/README.Portability | 13 |
2 files changed, 13 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 84deb16eee0..8a5201d1422 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-07-15 Michael Meissner <meissner@redhat.com> + + * README.Portability: Update integer suffixes and function + prototype sections. + 2000-07-15 Neil Booth <NeilB@earthling.net> * README.Portability: Small update. diff --git a/gcc/README.Portability b/gcc/README.Portability index a7331512d28..d6c8aecaa5d 100644 --- a/gcc/README.Portability +++ b/gcc/README.Portability @@ -155,6 +155,9 @@ ansidecl.h for the definitions of the above macros and more. #define PARAMS(paramlist) () /* K+R C. */ #define VPARAMS(args) (va_alist) va_dcl +One aspect of using K+R style function declarations, is you cannot have +arguments whose types are char, short, or float, since without prototypes (ie, +K+R rules), these types are promoted to int, int, and double respectively. Calling functions through pointers to functions ----------------------------------------------- @@ -230,10 +233,6 @@ int is done as an unsigned comparison in K+R (since unsigned char promotes to unsigned) while it is signed in ISO (since all of the values in unsigned char fit in an int, it promotes to int). -** Not having any argument whose type is a short type (char, short, -float of any flavor) and subject to promotion. ** - - Trigraphs --------- @@ -245,7 +244,11 @@ them. Suffixes on Integer Constants ----------------------------- -**Using a 'u' suffix on integer constants.** +K+R C did not accept a 'u' suffix on integer constants. If you want to declare +a constant to be be unsigned, you must use an explicit cast. + +You should never use a 'l' suffix on integer constants ('L' is fine), since it +can easily be confused with the number '1'. Common Coding Pitfalls |

