diff options
author | kraai <kraai@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-01 20:24:41 +0000 |
---|---|---|
committer | kraai <kraai@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-01 20:24:41 +0000 |
commit | 82808dd33bc3e8d178e35ff879a5abba9c842896 (patch) | |
tree | 0083bc63aed01b8cbc32633fd4014680b03d4cf0 /gcc/README.Portability | |
parent | 65ff742686b5e8216a2da3700c62150b831e4507 (diff) | |
download | gcc-82808dd33bc3e8d178e35ff879a5abba9c842896.tar.gz |
* README.Portability (Function prototypes): Give an example of
declaring and defining a function with no arguments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55151 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/README.Portability')
-rw-r--r-- | gcc/README.Portability | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/README.Portability b/gcc/README.Portability index ccd05e7521d..dba12406c61 100644 --- a/gcc/README.Portability +++ b/gcc/README.Portability @@ -129,6 +129,17 @@ myfunc (var1, var2) ... } +This implies that if the function takes no arguments, it should be +declared and defined as follows: + +int myfunc PARAMS ((void)) + +int +myfunc () +{ + ... +} + You also need to use PARAMS when referring to function protypes in other circumstances, for example see "Calling functions through pointers to functions" below. |