Skip to content

Merge Declaration to Dominator [Not prioritized] #3

Description

@K-Wu

Code in python as follows

                if (len>4):
                    limit=3
                elif (len>2):
                    limit=2
                elif (len==2):
                    limit=1
                else:
                    limit=0

generates

if (len > 4)
      {
        int limit = 3;
      }
      else
      {
        if (len > 2)
        {
          limit = 2;
        }
        else
        {
          if (len == 2)
          {
            limit = 1;
          }
          else
          {
            limit = 0;
          }

        }

      }

in C. Should be

int limit 
if (len > 4)
      {
        limit = 3;
      }
      else
      {
        if (len > 2)
        {
          limit = 2;
        }
        else
        {
          if (len == 2)
          {
            limit = 1;
          }
          else
          {
            limit = 0;
          }

        }

      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions