Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplifying generated code #27

Open
3 of 6 tasks
mchalupa opened this issue Sep 3, 2019 · 0 comments
Open
3 of 6 tasks

Simplifying generated code #27

mchalupa opened this issue Sep 3, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@mchalupa
Copy link
Member

mchalupa commented Sep 3, 2019

(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:

@mchalupa mchalupa added the enhancement New feature or request label Sep 3, 2019
tomsik68 added a commit that referenced this issue Oct 4, 2019
block label is never followed by any declaration, so it isn't necessary

Part of #27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant