summaryrefslogtreecommitdiffstats
path: root/gcc/README.Portability
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/README.Portability')
-rw-r--r--gcc/README.Portability11
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.
OpenPOWER on IntegriCloud