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

Forward Declarations for Functions in the CTranslator #25

Open
NGovani opened this issue Mar 11, 2019 · 1 comment
Open

Forward Declarations for Functions in the CTranslator #25

NGovani opened this issue Mar 11, 2019 · 1 comment

Comments

@NGovani
Copy link

NGovani commented Mar 11, 2019

I just wanted to ask if you're going to be testing for function declarations in the c translator since it's not explicitly clear in the spec.

For example:

void f();

int main(){
f();
}

void f(){
definition here...
}

would a test case like this ever come up

@johnwickerson
Copy link
Contributor

Sorry for the slow reply. Forward declarations are needed if you want to support mutual recursion. This is something that could be tested (see the list of more advanced features), but I suggest you leave it as a low-priority feature.

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

No branches or pull requests

2 participants