This is the mail archive of the gcc-patches@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]

fix vaarg3 failure


This testcase is in error, it's perfectly acceptable to pass a non-POD
class as a named parameter to a varargs function.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-cp-vaargs3correct.patch===============
2003-12-15  Geoffrey Keating  <geoffk@apple.com>

	* g++.old-deja/g++.pt/vaarg3.C: Don't expect an error for passing
	a non-POD type as the last named parameter of a varargs function.

*** vaarg3.C.~1.2.~	Fri May  2 14:41:55 2003
--- vaarg3.C	Mon Dec 15 12:48:07 2003
***************
*** 12,18 ****
  void PrintArgs (Type somearg, ...)
  { 
  va_list argp;
! va_start (argp, somearg); // { dg-error "" } cannot pass non-POD
  Type value;
  value = va_arg (argp, Type); // { dg-error "" } cannot pass non-POD
  va_end (argp);
--- 12,18 ----
  void PrintArgs (Type somearg, ...)
  { 
  va_list argp;
! va_start (argp, somearg);
  Type value;
  value = va_arg (argp, Type); // { dg-error "" } cannot pass non-POD
  va_end (argp);
============================================================


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