Skip to content

unify prototypes/defs with compatible but different itypes #403

@mwhicks1

Description

@mwhicks1

If we have this code:

int *foo(int *a) {
 a = (int *)5;
 return a;
}

Then converting it (using liberalized itypes) leads to:

int *foo(int *a : itype(_Ptr<int>)) : itype(_Ptr<int>) {
 a = (int *)5;
 return a;
}

However, if we add the liberal prototype at the outset, as follows, 3c makes no changes to the file, i.e., definition of foo is not changed.

int *foo(int *a : itype(_Ptr<int>)) : itype(_Ptr<int>);
int *foo(int *a) {
 a = (int *)5;
 return a;
}

This is OK as far as Checked C's clang is concerned, but I think we should at the least add the itype to it, with the goal of making the prototypes uniform.

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