[llvm-bugs] [Bug 37845] New: Do not warn for artificial expressions.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 19 01:30:02 PDT 2018


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

            Bug ID: 37845
           Summary: Do not warn for artificial expressions.
           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:

namespace std
{
 struct string
 {
 ~string();
 string();
 };
}

int

main(const int,
 const char * const * const)
{
 std::string x[0UL][0UL] =
 {
 };

 std::string y[0UL] =
 {
 };

 int z[0ul][0UL] =
 {
 };

 return 0;
}

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

Indeed, a previous version of g++ produces a different warning message, but
users are not satisfied. As a result, g++ generates a new warning message.
However, clang++ accepts it without any warnings. Shall clang also add some
warning messages for this?

-- 
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/58be912c/attachment.html>


More information about the llvm-bugs mailing list