boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

069-multi-fn.c (250B)


      1 /* §J.3 — multi-function TU with forward references.
      2  * main calls helper before helper is defined. */
      3 int helper(int x);
      4 
      5 int main(void) {
      6     return helper(20) + helper(15);  /* (20+1) + (15+1) = 37 */
      7 }
      8 
      9 int helper(int x) {
     10     return x + 1;
     11 }