If a compiler's work is essentially translating source code into machine level code, can there be any glitch in a compiler, i.e. a faulty translation? The same goes for an interpreter: can it fail to output the required content sometimes? I have not heard of any bugs in compilers/interpreters, but do they exist?
Can compilers and interpreters have bugs, and what can we (as users) do to deal with them?
compiler;bug;interpreters
YesYou tend to find them more in languages that are actively being developed than in those that are relatively mature (and thus don't see a lot of change on a frequent basis). This is probably why most languages are released at various 'stages' of stability. A nightly build is far less likely to be stable than a release candidate, which itself is less likely to be stable than a fully released and actively used version.Luckily most of these languages (especially those that are open source) will have a public bug tracking system that you can submit reports to. In my own experience, I ran into a fairly obscure but severe bug in Scala on Windows. I submitted my findings to the bug tracker and the issue was fixed fairly quickly. In that case, the language developers were smart enough to include a helpful note in the error log output, suggesting that what I'd run into was in fact a compiler error, and said where to submit the report.