home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / std / c / 2995 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  1.4 KB

  1. Path: sparky!uunet!sdrc!thor!scjones
  2. From: scjones@thor.sdrc.com (Larry Jones)
  3. Newsgroups: comp.std.c
  4. Subject: Re: A different question about va_start & va_end.
  5. Message-ID: <2230@sdrc.COM>
  6. Date: 8 Nov 92 18:33:15 GMT
  7. References: <1992Nov6.014500.1353@netcom.com>
  8. Sender: news@sdrc.COM
  9. Lines: 30
  10.  
  11. In article <1992Nov6.014500.1353@netcom.com>, rfg@netcom.com (Ronald F. Guilmette) writes:
  12. < Must a standard conforming implementation accept:
  13. <     #include <stdarg.h>
  14. <     int i;
  15. <     int j;
  16. <     va_list ap;
  17. <     void foo (int bar, ...)
  18. <     {
  19. <         i = (va_start (ap, bar), 99);
  20. <         j = (va_end (ap), 88);
  21. <     }
  22. < The function declarations shown in 4.8.1.1 and 4.8.1.2 seem to suggest
  23. < that the answer is yes.
  24.  
  25. Indeed they do, but I distinctly remember discussions involving current
  26. implementations of <varargs.h> that include unbalanced braces in
  27. va_start and va_end, and I thought the intent was to allow that kind of
  28. implementation.  I think this is deserving of a formal request for
  29. interpretation.  And, while you're at it, you ought to ask about whether
  30. the intent was to require the va_list to be a local variable or not as
  31. Norman Diamond pointed out.
  32. ----
  33. Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH  45150-2789  513-576-2070
  34. larry.jones@sdrc.com  or  ...uunet!sdrc!larry.jones
  35. I don't NEED to compromise my principles, because they don't have
  36. the slightest bearing on what happens to me anyway. -- Calvin
  37.