* README.Portability (Function prototypes): Document new
authorkraai <kraai@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Jul 2002 20:09:52 +0000 (20:09 +0000)
committerkraai <kraai@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Jul 2002 20:09:52 +0000 (20:09 +0000)
variable-argument function macros.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55150 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/README.Portability

index a4d02b4..85775c9 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-01  Matt Kraai  <kraai@alumni.cmu.edu>
+
+       * README.Portability (Function prototypes): Document new
+       variable-argument function macros.
+
 Mon Jul  1 19:55:17 2002  J"orn Rennecke <joern.rennecke@superh.com>
 
        * sh.c (langhooks.h): Include.
index d69c386..ccd05e7 100644 (file)
@@ -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