Skip to content

typecheck return bounds expression for function pointer types #89

@dtarditi

Description

@dtarditi

The Checked C clang implementation is not typechecking returnb ounds expressions for function pointer types. The following two methods compile without errors:

void fn121(int (*fnptr)(void) : count(5));
void fn122(array_ptr<void> (*fnptr)(void) : count(5));

The first case declares a return bounds expression of count(5) for an integer return value, which is not legal. The second case declares a return bounds expression of count(5) for an array_ptr return value, which is also illegal.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions