This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Pointer error with MIPS
- From: "chunxia qiudong" <xiachunqiu at hotmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 12 Aug 2002 19:04:42 +0800
- Subject: Pointer error with MIPS
- Bcc:
Dear all,
I'm amazing about my cross compiler for TX39 (mips I).
The uninitialized data pointer is always located to address 0x00. i.e :
...
void reverse_copy(char *str_1,char *str_2)
{
char *temp_str; // also the temp_str point to 0x00 ??
...
...
}
...
int main(void)
{
char *str_1,*str_2;
str_1="test"; // GCC put str_1 to a dedicated address, but str_2 point
to 0x00
reverse_copy(str_1,str_2);
...
...
return 0;
}
So is there any constrains for GCC to put the uninitialized pointer within
a valid address (above 0x80000000 is OK for my system).
I tried the same program under PC. The BorlandC keep these pointer within a
valid address for PC (not 0x00), I don't know how the GCC handle it.
Best regards
Stewart
_________________________________________________________________
Ãâ·ÑÏÂÔØ MSN Explorer: http://explorer.msn.com/lccn/