Skip to content

C compiler: missing diagnostics "dereferencing 'void *' pointer" #53631

Closed
@pmor13

Description

@pmor13

Sample code (t0.c):

void f(void* p)
{
	*p;
}

Invocation:

$ clang t0.c -std=c11 -pedantic -Wall -Wextra -c

Expected diagnostics:

dereferencing 'void *' pointer

Actual diagnostics:

<nothing>

Version:

13.0.0

C11, 6.5.3.2 Address and indirection operators, Semantics, 4:

The unary * operator denotes indirection. If the operand points to a function, the result is a function
designator; if it points to an object, the result is an lvalue designating the object.

C11, 6.3.2.1 Lvalues, arrays, and function designators, 1:

An lvalue is an expression (with an object type other than void) that potentially designates an object; ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    cclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerenhancementImproving things as opposed to bug fixing, e.g. new or missing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions