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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to