On Feb 2 10:58, Corinna Vinschen wrote: > On Feb 1 16:45, Eric Blake wrote: > > On 02/01/2011 03:41 PM, Rusty Russell wrote: > > > OK, your /usr/include/err.h doesn't have the annotations to tell gcc that > > > it > > > doesn't return. > > > > I'm a bit surprised that cygwin provides the BSD interface err() but > > lacks the glibc interface error() from "error.h", even though both > > interfaces are equally non-standard, and cygwin strives more for Linux > > compatibility. [...] > > That's a clear case of > http://cygwin.com/acronyms/#SHTDI > http://cygwin.com/acronyms/#PTC > > > > Mine looks like so (Ubuntu): > > > > > > extern void err (int __status, __const char *__format, ...) > > > __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))); > > > > But it is indeed the case that the BSD interface err() always calls > > exit() (see cygwin/libc/bsdlib.cc in the sources), and could therefore > > be marked noreturn in the headers if someone were to provide a patch. > > ...as long as we don't just copy the Linux headers for licensing > reasons.
For now I added the noreturn attribute to the [v]err[x] functions. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple

