- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Compiler version and platform:
Intel(R) C Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.0.098 Build 20160721
The latest clang also incorrectly rejects the code.
$ g++-6.2 -Wall -Wextra -pedantic -std=c++14 small.cpp $ $ icc -std=c++14 small.cpp small.cpp(12): error: a non-POD (Plain Old Data) class type cannot be fetched by va_arg A v = va_arg (a, A); ^ small.cpp(19): warning #1595: non-POD (Plain Old Data) class type passed through ellipsis foo (t, t); ^ compilation aborted for small.cpp (code 2) $ $ cat small.cpp #include <cstdarg> struct A { virtual ~A () {} }; void foo (A p, ...) { va_list a; va_start (a, p); A v = va_arg (a, A); va_end (a); } int main () { A t; foo (t, t); return 0; } $
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please allow me sometime to reproduce and debug this issue. I will update you as soon as I am able to reproduce.
Thanks,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
This issue has been escalated to engineering team, will check status and keep update you.
Thanks,
Reddy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue is addressed in the 17.0 up4 compiler, hence closed it.
Thanks,
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page