Skip to content

Remove obsolete casts #525

Open
Open
@mwhicks1

Description

@mwhicks1

Suppose we have

void baz(_Array_ptr<int> p : count(len), int len);
void foo(int *p : itype(_Array_ptr<int>) count(n), int n) {
  baz(_Assume_bounds_cast<_Array_ptr<int>>(p, count(n)),n);
}

Running via 3c -alltypes (in the https://github.com/correctcomputation/checkedc-clang/tree/resolve_itypes branch) removes the unneeded itype, but leaves in the cast:

void baz(_Array_ptr<int> p : count(len), int len);
void foo(_Array_ptr<int> p : count(n), int n) {
  baz(_Assume_bounds_cast<_Array_ptr<int>>(p, count(n)),n);
}

Can we drop the cast, too? What about also dropping unneeded C-style casts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions