This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/51644] New: [4.7 Regression] va_list vs. warning: ânoreturnâ function does return is not fixable
- From: "jan.kratochvil at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 20 Dec 2011 21:31:47 +0000
- Subject: [Bug c/51644] New: [4.7 Regression] va_list vs. warning: ânoreturnâ function does return is not fixable
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51644
Bug #: 51644
Summary: [4.7 Regression] va_list vs. warning: ânoreturnâ
function does return is not fixable
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jan.kratochvil@redhat.com
PASS: gcc (GCC) 4.6.3 20111220 (prerelease)
FAIL: gcc (GCC) 4.7.0 20111220 (experimental)
#include <stdarg.h>
extern __attribute__ ((__noreturn__)) void b (int s, va_list ap);
__attribute__ ((__noreturn__)) void a (int s, ...)
{
va_list args;
va_start (args, s);
b (s, args);
va_end (args);
}
-Wall -fexceptions
35.c:9:1: warning: ânoreturnâ function does return [enabled by default]
It gets fixed by removing that "va_end" but I must not (suggested by Tom
Tromey):
ISO C99 7.15.1
Each invocation of the va_start and va_copy macros shall be matched by a
corresponding invocation of the va_end macro in the same function.