cimplec / sim-c

A dynamically typed high-level front end for C

Home Page:https://cimplec.github.io/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG REPORT] stdio.h gets included for array/pointer declaration + assignment

frankhart2018 opened this issue · comments

Describe the bug
When compiling a code containing only a single line of array declaration + assignment, the resulting C code has stdio.h included which should not be the case. The same issue arises in pointer declaration + assignment. Handle both these cases to not include stdio.h.

simC Code

var a[2] = {1, 2}

C Code

#include <stdio.h>
	int a[2] = {1,2};

Expected C Code

	int a[2] = {1,2};

Can I work on this? @frankhart2018

Sure assigning this to you @Chasmiccoder.