summaryrefslogtreecommitdiff
path: root/gcc/README.Portability
diff options
context:
space:
mode:
authorkraai <kraai@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-01 20:09:52 +0000
committerkraai <kraai@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-01 20:09:52 +0000
commit65ff742686b5e8216a2da3700c62150b831e4507 (patch)
tree9dbc1177afd3d82aca4bc64f78e1d007f9c7eac4 /gcc/README.Portability
parentd240b39de0b472c976f2839d9fe0ce94e926025d (diff)
downloadgcc-65ff742686b5e8216a2da3700c62150b831e4507.tar.gz
* README.Portability (Function prototypes): Document new
variable-argument function macros. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55150 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/README.Portability')
-rw-r--r--gcc/README.Portability28
1 files changed, 6 insertions, 22 deletions
diff --git a/gcc/README.Portability b/gcc/README.Portability
index d69c3869b3f..ccd05e7521d 100644
--- a/gcc/README.Portability
+++ b/gcc/README.Portability
@@ -139,32 +139,16 @@ void cpp_ice PARAMS ((cpp_reader *, const char *msgid, ...));
void
cpp_ice VPARAMS ((cpp_reader *pfile, const char *msgid, ...))
-{
-#ifndef ANSI_PROTOTYPES
- cpp_reader *pfile;
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- pfile = va_arg (ap, cpp_reader *);
- msgid = va_arg (ap, const char *);
-#endif
+{
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, cpp_reader *, pfile);
+ VA_FIXEDARG (ap, const char *, msgid);
...
- va_end (ap);
+ VA_CLOSE (ap);
}
-For the curious, here are the definitions of the above macros. See
-ansidecl.h for the definitions of the above macros and more.
-
-#define PARAMS(paramlist) paramlist /* ISO C. */
-#define VPARAMS(args) args
-
-#define PARAMS(paramlist) () /* K+R C. */
-#define VPARAMS(args) (va_alist) va_dcl
+See ansidecl.h for the definitions of the above macros and more.
One aspect of using K+R style function declarations, is you cannot
have arguments whose types are char, short, or float, since without