Bug ID: 30476
           Summary: clang silently accepts syntactically wrong conversion
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
    Classification: Unclassified

Consider this example:

#include <string>
class Foo {
  const operator std::string() const { return "A"; }

Clang compiles this without a warning or error, silently ignoring the first
garbage const. MSVC and GCC throw an error on this, and so should clang.

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to