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

printf issues #650

Open
neworderofjamie opened this issue Jan 13, 2025 · 4 comments
Open

printf issues #650

neworderofjamie opened this issue Jan 13, 2025 · 4 comments
Assignees
Labels
Milestone

Comments

@neworderofjamie
Copy link
Contributor

neworderofjamie commented Jan 13, 2025

printf("test\n");

is pretty-printed as:

printf("test\n", );

which does not compile

@neworderofjamie neworderofjamie added this to the GeNN 5.2.0 milestone Jan 13, 2025
@eshant742
Copy link

Hi @neworderofjamie, can you assign this issue to me? I can look into it.

@neworderofjamie
Copy link
Contributor Author

Sure - that would be a very nice bug to fix. The problematic code is around https://github.com/genn-team/genn/blob/master/src/genn/genn/transpiler/prettyPrinter.cc#L276-L286.

@neworderofjamie
Copy link
Contributor Author

neworderofjamie commented Mar 5, 2025

To make iteration a bit quicker, it's probably easiest to reproduce this with a C++ example. For example if you add "printf(\"test\\n\");\n" to the end of the IzhikevichV model in https://github.com/neworderofjamie/genn_examples/blob/master/izk_regimes/model.cc#L21 and build it using genn-buildmodel.sh model.cc on Linux/MAC or genn-buildmodel model.cc on Windows you can easily reproduce this bug.

@coderpheonix
Copy link

Hi @neworderofjamie,

I hope you're doing well. I came across the issue regarding the incorrect pretty-printing of printf("test\n");, which is being displayed as printf("test\n", );. I'm interested in working on fixing this bug. Could you kindly let me know if this issue is still open or if it has already been resolved? If it's still open, I'd be happy to take a look at it.

Thanks in advance!

Best regards,
Shahidul Islam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants