Description of problem: What problem/issue/behavior are you having trouble with? What do you expect to see? I am using dev toolset 6.0. Here is a small reproduction: //a.C #include <string> #include <iostream> class Trouble { public: explicit Trouble(int) { std::cout << "int" << std::endl; } Trouble(const char *) { std::cout << "const char*" << std::endl; } // Trouble(const signed char *) {} Trouble(const unsigned char *) { std::cout << "const unsigned char* " << std::endl;} private: std::string data; }; Trouble makeTroubleObject() { return Trouble(42); } Trouble makeTrouble() { return 42; } int main() { auto o1 = makeTroubleObject(); auto o2 = makeTrouble(); return 0; } Build it with g++ -std=c+=14 -g a.C I expect I should get a compilation error in this line as the constructor is explicit. "Trouble makeTrouble() { return 42; }" But it compiles fine, and even worse, it seems the object "o2" was not constructed properly thus I got a core dump. This affects our adoption of Dev toolset 6.0. Version-Release number of selected component (if applicable): gcc version 6.2.1 20160916 (Red Hat 6.2.1-3) (GCC) How reproducible: Always Steps to Reproduce: 1. compile test program 2. execute compiled test 3. boom. Actual results: <snip> [fmhirtz@ivanova ~]$ g++ --std=c++14 -g a.C -g [fmhirtz@ivanova ~]$ ./a.out int Segmentation fault (core dumped) </snip> Expected results: Compilation failure likely. Additional info: This is impacting the client's ability to migrate to DTS6 so it's a priority.
Successfully reproduced with DTS-6 (no fail) and verified with DTS-7 (devtoolset-7-gcc-7.2.1-1.el{6,7}). VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:3016