This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]