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

In 447 #489

Merged
merged 2 commits into from
Feb 18, 2021
Merged

In 447 #489

merged 2 commits into from
Feb 18, 2021

Conversation

frankhart2018
Copy link
Member

Closes #447

Implementation details
Currently any opcode which has three values split by --- included stdio.h in the compiled C code. Among all the opcodes with value split in three parts by --- only input has the third value in the split list as a single character, which is for the type. Identifying this as a unique feature of inputs, added an extra and condition to the inclusion of stdio.h.

Note:- This is only a temporary fix until #353 gets resolved, at which point this should be done in a better way.

Test Case 1

simC Code

MAIN
    var a[2] = {1, 2}   
END_MAIN

C Code (If generated)

int main() {
	int a[2] = {1,2};

	return 0;
}

Number of unit tests passing: [273 / 273]
Number of code tests passing: [160 / 160]

@frankhart2018 frankhart2018 merged commit 64f96d9 into master Feb 18, 2021
@frankhart2018 frankhart2018 deleted the in-447 branch February 18, 2021 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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