[comp.sys.mac] Shadow of "shadow"

hvs@pender (H.V. Sorensen) (09/28/89)

I recently got the v. 4 of Think C (TC) and started programming. In one of my
programs I had a strange bug, which I found was caused by using the name
"shadow" for an integer variable. TC complains about an "illegal
re-decleration of variable" or something like that. To reproduce the problem
try to compile the program below:
     #include <stdio.h>
     int shadow;
     main()
     {
          printf("hello\n");
     }
I am using a "virgin" copy of TC4 with the ANSI library as only other file in
my project. By changing the name to anything but shadow, the program compiles
perfectly. Are there reserved words in TC that I am not aware of? If so are
there any other "reserved" words I should be aware of? Anybody out there with
an explanation?

Thanks,  Henrik Sorensen

******************************************************************************
*   Henrik Sorensen               Department of Electrical Enginering        *
*   Internet: hvs@ee.upenn.edu    University of Pennsylvania                 *
******************************************************************************