Skip to content

GAZPREA: Procedure definition after call #167

Open

Description

@r4nd0mus3rnam3
procedure main() returns integer {
    var integer x = 1;
    call increment(x);
    x -> std_output;
    '\n' -> std_output;
    return 0;
}

procedure increment(var integer x) {
    x = x + 1;
}

//CHECK:CallError on line 3
//CHECK:

The reference compiler doesn't see this as an issue, and continues compilation. However, if this is allowed, why are procedure prototypes a feature as well if the position of the procedure to be called is not reinforced?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions