-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Closed as not planned
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerquality-of-implementationwontfixIssue is real, but we can't or won't fix it. Not invalidIssue is real, but we can't or won't fix it. Not invalid
Description
Compiling this code:
void foo(void)
{
struct x* y;
*y;
}
with -O3 -std=c11 -pedantic -Wall -Wextra leads to:
<source>:4:5: error: incomplete type 'struct x' where a complete type is required
4 | *y;
For people who learned C11 by reading C11 this diagnostic may be confusing because C11 does not require the operand of the unary * operator to be pointer type, which points to an object of a complete type.
Expected diagnostics:
<source>:4:5: error: lvalue conversion: lvalue has an incomplete type
4 | *y;
Metadata
Metadata
Assignees
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerquality-of-implementationwontfixIssue is real, but we can't or won't fix it. Not invalidIssue is real, but we can't or won't fix it. Not invalid