You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The identifier char is not mangled in C backend #2359
Nope, I think we need to recognise the keywords and mangle them, .i.e, if we see char, we need to replace it as _xx_char_xx or __xx_char or something that is less probable to be used. For this, I think we have to handle it in the unqiue_symbol pass or the C backend itself.
Activity
tanay-man commentedon Feb 14, 2024
@Thirumalai-Shaktivel What should I replace the restricted keywords in C & C++ with?
Will renaming them
LFORTRAN_RESTRICTED_keywordbe ok?Thirumalai-Shaktivel commentedon Feb 17, 2024
Nope, I think we need to recognise the keywords and mangle them, .i.e, if we see
char, we need to replace it as_xx_char_xxor__xx_charor something that is less probable to be used. For this, I think we have to handle it in theunqiue_symbolpass or theCbackend itself.certik commentedon Feb 17, 2024
See https://lfortran.zulipchat.com/#narrow/stream/311866-LPython/topic/asr-.3Ec for the discussion about this. Indeed, enhancing the mangling pass is the way to go.
tanay-man commentedon Feb 18, 2024
I have implemented this in PR #2546. I have only implemented the mangling for the C backend; the C++ backend is still pending.
Implemented mangling for c back-end as per issue #2359 . (#2546)
kmr-srbh commentedon Apr 29, 2024
@Thirumalai-Shaktivel this issue could be closed as #2546 was merged.
Thirumalai-Shaktivel commentedon Jun 16, 2024
I following works, so closing this