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 target/31488] va_list considered non-POD



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


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