http://llvm.org/bugs/show_bug.cgi?id=6485
Summary: Diagnostic for using non-POD type with va_start needs
improvement
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: trivial
Priority: P5
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
cop...@overthere:~$ clang -x c++ -
#include <stdarg.h>
struct foo { virtual void bar(); };
void baz (foo f, ...) {
va_list v;
va_start(v, f);
}
// END OF TESTCASE
<stdin>:7:3: error: cannot pass object of non-POD type 'struct foo' through
variadic function; call will abort at runtime [-Wnon-pod-varargs]
va_start(v, f);
^
<stdin>:7:15: note: instantiated from:
va_start(v, f);
^
1 diagnostic generated.
// END OF OUTPUT
GCC does not issue a diagnostic here, however, it is good that clang do so
([support.runtime]/3). The diagnostic could bear improvement, however - prehaps
to something along the lines of "cannot use va_start on a parameter of non-POD
type 'struct foo'".
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs