Skip to content

flow analysis in for loop #408

@thradams

Description

@thradams

I believe the following code is not producing the expected result or diagnostics.

#pragma safety enable

int * _Opt f();

int main(){
    for (int * _Opt p = f(); p ; p++)
    {
        *p;    //main.c:8:10: warning 33: dereference a NULL object
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions