Skip to content

Commit

Permalink
* README.Portability: Small update.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35056 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
neil committed Jul 16, 2000
1 parent c82c078 commit 10bfc44
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
4 changes: 4 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2000-07-16 Neil Booth <NeilB@earthling.net>

* README.Portability: Small update.

2000-07-15 Richard Henderson <rth@cygnus.com>

* config/ia64/ia64-protos.h (ia64_move_ok): Prototype.
Expand Down
23 changes: 19 additions & 4 deletions gcc/README.Portability
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
-----

Expand Down

0 comments on commit 10bfc44

Please sign in to comment.