diff options
author | Neil Booth <neilb@earthling.net> | 2000-07-16 02:14:14 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-07-16 02:14:14 +0000 |
commit | 59a5130c3cb5ede3d2aae50743d2cba06efa7091 (patch) | |
tree | da29f386742d032078e5bbde6a9f26d8f7c8dd5e /gcc/README.Portability | |
parent | 5b2ff385d530365adf4fab64266ac30bfe5d0311 (diff) | |
download | gcc-59a5130c3cb5ede3d2aae50743d2cba06efa7091.tar.gz |
* README.Portability: Small update.
From-SVN: r35056
Diffstat (limited to 'gcc/README.Portability')
-rw-r--r-- | gcc/README.Portability | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/gcc/README.Portability b/gcc/README.Portability index cc5fa32d56a..43efc39f3c3 100644 --- a/gcc/README.Portability +++ b/gcc/README.Portability @@ -50,6 +50,13 @@ should be written String literals --------------- +Some SGI compilers choke on the parentheses in:- + +const char string[] = ("A string"); + +This is unfortunate since this is what the GNU gettext macro N_ +produces. You need to find a different way to code it. + K+R C did not allow concatenation of string literals like "This is a " "single string literal". @@ -80,8 +87,8 @@ needs to be coded in some other way. signed keyword -------------- -The signed keyword did not exist in K+R comilers, it was introduced in -ISO C89, so you cannot use it. In both K+R and standard C, +The signed keyword did not exist in K+R compilers, it was introduced +in ISO C89, so you cannot use it. In both K+R and standard C, unqualified char and bitfields may be signed or unsigned. There is no way to portably declare signed chars or signed bitfields. @@ -163,8 +170,9 @@ double respectively. Calling functions through pointers to functions ----------------------------------------------- -K+R C compilers require brackets around the dereferenced pointer -variable, whereas ISO C relaxes the syntax. For example +K+R C compilers require parentheses around the dereferenced function +pointer expression in the call, whereas ISO C relaxes the syntax. For +example typedef void (* cl_directive_handler) PARAMS ((cpp_reader *, const char *)); *p->handler (pfile, p->arg); @@ -192,6 +200,13 @@ will stringify an argument; to get the same result on K+R and ISO compilers x should not have spaces around it. +Passing structures by value +--------------------------- + +Avoid passing structures by value, either to or from functions. It +seems some K+R compilers handle this differently or not at all. + + Enums ----- |