http://llvm.org/bugs/show_bug.cgi?id=12883
Serge Pavlov <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED CC| |[email protected] Resolution|--- |WORKSFORME --- Comment #8 from Serge Pavlov <[email protected]> --- Current version if clang doesn't crash on this file: $ clang -v clang version 3.4 (trunk 186143) Target: x86_64-unknown-linux-gnu Thread model: posix $ clang++ --std=c++11 dummy-luSc32.ii In file included from dummy.cpp:1: dummy.cpp:5:33: error: unknown class name 'exception'; did you mean 'std::exception'? class InvariantFailure : public exception ^~~~~~~~~ std::exception /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/exception:60:9: note: 'std::exception' declared here class exception ^ In file included from dummy.cpp:1: dummy.cpp:9:21: error: extra qualification on member 'InvariantFailure' InvariantFailure::InvariantFailure(std::string &msg) : message(msg) {}; ~~~~~~~~~~~~~~~~~~^ dummy.cpp:10:23: error: exception specification of overriding function is more lax than base version virtual const char *what() const { return this->message; } ^ /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/exception:68:25: note: overridden virtual function is here virtual const char* what() const throw(); ^ In file included from dummy.cpp:1: dummy.cpp:10:45: error: no viable conversion from 'const std::string' (aka 'const basic_string<char>') to 'const char *' virtual const char *what() const { return this->message; } ^~~~~~~~~~~~~ dummy.cpp:11:2: error: expected ';' after class } ^ ; dummy.cpp:22:13: error: no matching function for call to 'vsnprintf' int size = vsnprintf(buf.c_str(), 0, fmt, args); ^~~~~~~~~ /usr/include/stdio.h:391:12: note: candidate function not viable: 1st argument ('const char *') would lose const qualifier extern int vsnprintf (char *__restrict __s, size_t __maxlen, ^ In file included from dummy.cpp:1: dummy.cpp:24:3: error: use of undeclared identifier 'dbg' dbg("vsnprintf failed!"); ^ dummy.cpp:29:9: error: no matching function for call to 'vsnprintf' size = vsnprintf(buf.c_str(), size, fmt, args); ^~~~~~~~~ /usr/include/stdio.h:391:12: note: candidate function not viable: 1st argument ('const char *') would lose const qualifier extern int vsnprintf (char *__restrict __s, size_t __maxlen, ^ In file included from dummy.cpp:1: dummy.cpp:31:3: error: use of undeclared identifier 'dbg' dbg("vsnprintf failed!"); ^ 9 errors generated. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ LLVMbugs mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
