X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f X-Recipient: djgpp-workers AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=eyb/Bpim/I9pGXRt+VSFlZ1T6y1kpO+4q7GwVn0pgik=; b=aj4UCIzR7UNIP5/dgfDhdPCBHyvMpyfm0L2xhqgnn6D8ETs0aCuOvnOt4vsJ8sPN9G h9UqjrlzTea1MQiYKHpSXw3XbcyfZCzn+dFA2TR/DKiXfEw9YWVQAnj2PamLdwNxsyxh GS7FI66sKaIAEPAOft8ygTxWQrvlsv0e507GM= MIME-Version: 1.0 Date: Sun, 10 Jul 2011 18:32:03 +0300 Message-ID: Subject: longjmp not marked with noreturn attribute From: Ozkan Sezer To: djgpp-workers AT delorie DOT com Content-Type: text/plain; charset=ISO-8859-1 Reply-To: djgpp-workers AT delorie DOT com The setjmp.h from djgpp does not mark longjmp() as noreturn, therefore, g++ warns upon seeing a function who is calling longjmp() and marked as noreturn: host.c: In function 'void Host_Error(const char*, ...)': host.c:226: warning: 'noreturn' function does return The Host_Error() function in question is like: void Host_Error (const char *error, ...) { [... stuff ...] longjmp (host_abortserver, 1); } So, I suggest something like the following: --- setjmp.h.orig 2003-02-04 22:24:11.000000000 +0200 +++ setjmp.h 2011-07-10 18:21:40.000000000 +0300 @@ -22,7 +22,7 @@ typedef struct __jmp_buf { unsigned char __fpu_state[108]; /* for future use */ } jmp_buf[1]; -void longjmp(jmp_buf env, int val); +void longjmp(jmp_buf env, int val) __attribute__((__noreturn__)); int setjmp(jmp_buf env); #define setjmp setjmp /* required by C++ standard */ Regards. -- Ozkan