This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call
- From: "jason at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Nov 2003 19:07:11 -0000
- Subject: [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call
- References: <20030818211350.11971.poschmid@lbl.gov>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jason at gcc dot gnu dot org 2003-11-14 19:07 -------
Here is a valid program which we currently reject because va_start isn't magic
enough. We currently treat it as a normal variadic function.
#include <stdarg.h>
class A {
public:
A() {}
A(const A& x) {}
A& operator= (const A& a) {}
~A() {}
};
void f(A first...)
{
va_list ap;
va_start(ap, first);
int x = va_arg(ap, int);
}
int main()
{
A a;
f(a, 3);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11971