News for hackers. Stuff that matters.
Re:Forward Referencing in C by pornel on Monday June 05, 2023 @07:28PM (#36205798)
Complicated for the single-pass PDP-11 compiler.

Everything else that can fit AST in RAM can do it relatively easily. Modern C compilers have millions of lines and hundreds of person-years of work in them, so two passes and a lookup table is not a big deal.

It's just not done because the C standard doesn't say it should. Perhaps there is some preprocessor crime that this isn't compatible with, or they just don't want to break that PDP-11 compatibility.

There are no comments on this comment yet.