C Compilation Issue -- Appears Related to Quoted Items Inside Strings #23045
Labels
Bug
This tag is applied to issues which reports bugs.
Parallel CGEN
Unit: cgen
Bugs/feature requests, that are related to the default C generating backend.
Unit: Compiler
Bugs/feature requests, that are related to the V compiler in general.
There's a hard-to-replicate issue with V that results in bad C code being generated. Compiler version V 0.4.8 f3d0c53 on M2 MAX under MacOS X Sonoma. It seems to be related to a construct like this:
Note the quoted elements inside the string, "a.bb.cccc". This structure is being used by the "flag" module.
This issue comes and goes even with the code being unchanged; it's not clear why that's happening, but it happens even when I use -no-parallel. When the error DOES occur, the report points to one of the lines of code related to this structure, showing multiple double-quotes in a row, which is clearly not right. It complains about a parenthesis missing.
Unfortunately, I cannot provide the original code because it's under NDA. And when I tried to make a replication case, it went away.
The workaround is simple: either escape the quotes, or just remove them entirely. But that's just a kludge. I will continue to attempt to isolate a replication case that can be posted. So far, no luck.
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: