This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
problem porting using gcc on LYNX OS
- To: bug-gcc at gnu dot org, help-gcc at gnu dot org
- Subject: problem porting using gcc on LYNX OS
- From: Sandra Seymour <sandras at globes dot com>
- Date: Mon, 25 Oct 1999 10:51:39 -0700
I am trying to compile a program that seem to be having a scope problem on
LYNX using GCC. I works with other compilers. The '-traditional' cc
option doesn't work. Below is a small example program that demonstrates the
problem:
TEST.C
#include <stdio.h>
struct check {
int a;
char b;
};
int tmp;
void print_next();
void main()
{
tmp = 5;
printf("main: tmp = %d\n",tmp);
print_next();
}
TEST1.C
struct check {
int a;
char b;
};
int tmp;
void print_next()
{
tmp=6;
printf("print_next: tmp = %d\n",tmp);
}
This program generated the following errors:
/usr/tmp/cc1392.o(.bss+0x0):test1.c: multiple definition of `tmp'
/usr/tmp/cc1391.o(.bss+0x0):test.c: first defined here
Thanks,
Sandra