boot2

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

123-redecl-extern-var.c (300B)


      1 /* Compatible redecl: a variable declared extern can be re-declared
      2  * extern any number of times before the single tentative/initialized
      3  * definition. */
      4 
      5 extern int counter;
      6 extern int counter;
      7 
      8 int counter = 42;
      9 
     10 int main(int argc, char **argv) {
     11     if (counter != 42) return 1;
     12     return 0;
     13 }