Description of problem: The clang compiler fails to compile C++11 programs Version-Release number of selected component (if applicable): clang-3.5.0-6.fc21.x86_64 llvm-3.5.0-6.fc21.x86_64 How reproducible: Every time. Steps to Reproduce: 1. Testcase clang.cc: #include <memory> int main() {} 2. Compile with clang++ -o clang clang.cc -std=c++11 -O2 -D_FORTIFY_SOURCE=2. It does not matter whether c++11 or c++0x are used, but the problem does not happen if you omit _FORTIFY_SOURCE (or set it to 0) or disable optimization. Actual results: In file included from clang.cc:1: In file included from /bin/../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/memory:72: In file included from /bin/../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/iosfwd:40: In file included from /bin/../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/bits/postypes.h:40: In file included from /bin/../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/cwchar:44: In file included from /usr/include/wchar.h:884: /usr/include/bits/wchar2.h:291:14: error: use of undeclared identifier '__builtin_va_arg_pack' __fmt, __va_arg_pack ()); ^ /usr/include/sys/cdefs.h:349:26: note: expanded from macro '__va_arg_pack' # define __va_arg_pack() __builtin_va_arg_pack () ^ [output continues] Expected results: No output, return code 0.
confirmed on Fedora 22. same error.
Also: /usr/include/bits/stdio2.h:195:11: error: use of undeclared identifier '__builtin_va_arg_pack', Fedora 22
_FORTIFY_SOURCE cannot be used with clang + glibc. Code gets miscompiled: https://llvm.org/bugs/show_bug.cgi?id=16821 It is an unsupported configuration: https://llvm.org/bugs/show_bug.cgi?id=23277#c2 When you build an application with clang, against glibc, disable _FORTIFY_SOURCE.
This message is a reminder that Fedora 21 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 21. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '21'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 21 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.