X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <50F470CA.5030400@iki.fi> Date: Mon, 14 Jan 2013 21:55:38 +0100 From: Antti Kantee MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: adding noreturn attribute to pthread_exit Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi, Calling pthread_exit() at the end of a routine marked noreturn produces a compiler warning/error on cygwin: error: 'noreturn' function does return Is it possible to add the attribute to the cygwin pthread.h: --- pthread.h.orig 2012-10-19 14:40:13.000000000 +0200 +++ pthread.h 2013-01-14 21:40:00.018198900 +0100 @@ -137,7 +137,7 @@ void *(*)(void *), void *); int pthread_detach (pthread_t); int pthread_equal (pthread_t, pthread_t); -void pthread_exit (void *); +void pthread_exit (void *) __attribute__((__noreturn__)); int pthread_getcpuclockid (pthread_t, clockid_t *); int pthread_getschedparam (pthread_t, int *, struct sched_param *); void *pthread_getspecific (pthread_key_t); (note, i didn't check how it needs to trickle down in the cygwin implementation of pthread_exit()) - antti -- 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