News for hackers. Stuff that matters.
Re:It Is Never a Compiler Bug Until It Is by widforss on Wednesday September 30, 2020 @08:08AM (#24637892)
The first example sounds like a bug that could sneak in anywhere, but the second one makes me question how they laid out the compiler architecture.

Did they write a special expression parser just for declarations? I mean, this shouldn't be possible if there was just one expression parser?

Re:It Is Never a Compiler Bug Until It Is by devthrowawy on Wednesday September 30, 2020 @10:49AM (#24639281)
Probably more to do with compile time static expression evaluation (optimization) than parsing. Seems like it's not actually recursing down, just evaluating the root.
Re:It Is Never a Compiler Bug Until It Is by phaedrus on Wednesday September 30, 2020 @12:30PM (#24640539)
That could be, but my first thought was it's only compiling it to a single assembly instruction (which can only have two operands). Or it generates ADD instructions using a succession of registers or stack locations, but the initialization code blindly assumes the result is in the first register or stack location.