Hi again,

   This time a have been amazed at the strange  behaviour  of
   TCC regarding the scope.

   How can a function defined in file b.c be visible from a.c
   when its declaration is lacking in header  files  included
   in a.c and in a.c itself?

   When I try to declare in a.c a function with the same name
   I get a message about the function's having  been  defined
   twice!

   Is TCC supposed to work so or what?

   Example:
   Listing of a.c -------------------------------------------

     main () {
      printf("Hello!\n");
      print(4);
     }
   ----------------------------------------------------------

   Listing of b.c -------------------------------------------
     int print(int c) {
        printf("Print: %i", c); // it should not be visible!
     }
   ----------------------------------------------------------


Thanks in advance,
Anton



_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to