[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] How TCC handlse the scope
From: |
Anton |
Subject: |
[Tinycc-devel] How TCC handlse the scope |
Date: |
Fri, 22 Jun 2007 22:51:49 +0400 |
User-agent: |
Opera Mail/9.00 (Win32) |
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] How TCC handlse the scope,
Anton <=
- Re: [Tinycc-devel] How TCC handlse the scope, Rob Landley, 2007/06/22
- Re: [Tinycc-devel] How TCC handlse the scope, Anton, 2007/06/22
- Re: [Tinycc-devel] How TCC handlse the scope, Bernhard Fischer, 2007/06/22
- Re: [Tinycc-devel] How TCC handlse the scope, Anton, 2007/06/22
- Re: [Tinycc-devel] How TCC handlse the scope, David A. Wheeler, 2007/06/22
- Re: [Tinycc-devel] How TCC handlse the scope, Anton, 2007/06/22
- Re: [Tinycc-devel] How TCC handlse the scope, Rob Landley, 2007/06/23
- Re: [Tinycc-devel] How TCC handlse the scope, Dave Dodge, 2007/06/25