[llvm-bugs] [Bug 37847] New: clang++ does not produce error messages

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 19 01:56:09 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37847

            Bug ID: 37847
           Summary: clang++ does not produce error messages
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zhonghao at pku.org.cn
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

The code is as follow:

extern "C" int printf(const char*,...);
void *operator new(__SIZE_TYPE__, void*);
struct Counter {
 Counter(){printf("Hello World.\n");}
};
void *t;
template< typename T >
void resetData() {
 new ( t) Counter();
}
int main() {
 resetData<int>();
}

It comes from a gcc bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15083

g++ produces an error message, but clang++ does not.
Shall clang++ produces similar error messages?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180619/1bc6c999/attachment.html>


More information about the llvm-bugs mailing list