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++/57480] New: struct with a va_list considered as non-POD


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

            Bug ID: 57480
           Summary: struct with a va_list considered as non-POD
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: roman at tsisyk dot com

C++ frontend marks structs with va_list as non-POD.
This problem is probably related to 31488.

roman@work:~$ cat va_list_is_not_pod.cc 
#include <stdarg.h>
#include <type_traits>

struct fiber {
    va_list va;
};

int
main(int argc, char *argv[])
{
    static_assert(std::is_pod<struct fiber>::value, "Should be POD");
}


roman@work:~$ g++ -std=c++11 va_list_is_not_pod.cc -o test
va_list_is_not_pod.cc: In function âint main(int, char**)â:
va_list_is_not_pod.cc:11:5: error: static assertion failed: Should be POD

gcc version 4.7.2 (Debian 4.7.2-5)

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