[Bug target/31488] va_list considered non-POD

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Dec 29 20:42:00 GMT 2008



------- Comment #3 from ubizjak at gmail dot com  2008-12-29 20:39 -------
The testcase:

#include <stdarg.h>

extern int foo (int a, int b, ...);

int bar (int a, int b, ...)
{
  va_list args;
  va_start (args, b);
  int result = foo (a, b, args);
  va_end (args);
  return result;
}

g++ -O2:

pod.C: In function ‘int bar(int, int, ...)’:
pod.C:9: warning: cannot pass objects of non-POD type ‘struct va_list’ through
‘...’; call will abort at runtime


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |38664
              nThis|                            |
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-12-29 20:39:29
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31488



More information about the Gcc-bugs mailing list