Skip to content

Simplifying generated code #27

Open

Description

@mchalupa

(Just tracking the ideas for the future...)

// struct declarations

// anonymous struct declarations

// type definitions

// struct definitions

// function declarations
int main();
void test_assert(unsigned int var0);

// global variable definitions

int main(){
    unsigned int var0;
    unsigned int var1;
    unsigned int var2;
    unsigned int var3;
    block0: ;
    var0 = 0;
    var1 = 0;
    var2 = 1;
    var3 = 3;
    var1 = (((int)var2) + ((int)var3));
    var2 = 3;
    var3 = 5;
    test_assert((unsigned int)(var1 == 4));
    return 0;
}

This code has several issues that we could remove:

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions