[PATCH] missing va_end() in some IO functions (gmp 6.1.2)

Vincent Lefevre vincent at vinc17.net
Thu Mar 14 09:08:09 UTC 2019


On 2019-03-13 17:05:02 +0100, Niels Möller wrote:
> Vincent Lefevre <vincent at vinc17.net> writes:
> 
> > Moreover, the va_end(3) man page says:
> >
> >   On  some  systems,  va_end  contains  a  closing  '}' matching a '{' in
> >   va_start, so that both macros must occur in the same function, and in a
> >   way that allows this.
> 
> Curious. Which man page, and which systems?

The va_end(3) man page (which is actually the stdarg(3) man page)
under Linux. See:

  http://man7.org/linux/man-pages/man3/stdarg.3.html

> On such systems, va_copy would similarly have to be a macro with an
> unmatched '{' in the expansion, right? Sounds more than a bit awful.

Yes. But apparently this is just history. So, I suppose that this
rule on braces could be safely ignored nowadays. I've reported a
bug to have this paragraph removed from the man page:

  https://bugzilla.kernel.org/show_bug.cgi?id=202907

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-bugs mailing list