$B:[email protected]|!'(B2002.10.9
$B=$@5F|!'(B2004.01.8
{$B$3$N>l9g!"(B $B%W%m%0%i%`$,=*N;$9$k$^$G2s<}$G$-$J$$(B $B%a%b%jNN0h$,(B $B%W%m%;%9Cf$K;D$k$3$H$K$J$j$^$9!#(B $B$3$l$r%a%b%j%j!<%/$H8F$S$^$9!#(B $B%a%b%j%j!<%/$,@Q$b$C$F9T$/$H!"(B $B;HMQ2DG=$J%a%b%j$,A}$($F$f$-!"(B $B%W%m%0%i%`$rDd;_$;$6$k$($J$/$J$j$^$9!#(B
{
char* p = (char*)malloc( SIZE ); /* (1) */
}
/* $BJQ?t(B p $B$,%9%3!<%W$N30$K=P$k$H!"(B(1) $B$K$h$C$F3NJ]$5$l$?(B
$B%a%b%jNN0h$O2rJ|ITG=(B */
}
void foo(char** p) {$B%@%s%0%j%s%0%]%$%s%?$NCf$G(B $B:G$bH/8+$,8+$D$1?I$$$N$,!"(B $BK\Mh(B $B@5>o$J%*%V%8%'%/%H$r;X$7$F$$$?%]%$%s%?$,!"(B $B;2>H$7$F$$$k%*%V%8%'%/%H$,2rJ|$5$l$?$?$a$K(B $B%@%s%0%j%s%0%]%$%s%?$r;X$7$F$7$^$&%Q%?!<%s$G$9!#(B
char c;
*p = &c;
}
char* p = NULL;
foo(&p);
/* p $B$OIT@5$J%a%b%j%"%I%l%9$r;X$7$F$$$k(B */
char* p = (char*) malloc(SIZE);$B2rJ|$5$l$?NN0h$,!"(B $Bl9g!"(B $BIT@5$J=q$-JQ$($r9T$C$F$7$^$$$^$9!#(B
free(p);
char* q = (char*) malloc(SIZE);
/* p $B$OIT@5$J%a%b%j%"%I%l%9$r;X$7$F$$$k(B */
/* $B$b$7$+$9$k$H(B p == q $B$G!"(Bp $B$r=q$-D>$9$H(B q $B$NFbMF$,JQ$o$k$+$b(B */
$B%i%$%V%i%j$r;H$&$?$a$KI,MW$J(B include $B%U%!%$%k$O%$%s%9%H!<%k$5$l$F$$$^$;$s!#(B gc6.1/include $B$N2<$N%U%!%$%k$r!"E,Ev$J%G%#%l%/%H%j$K%3%T!<$7$F$*$-$^$7$g$&!#(B> tar xzvf gc6.1.tar.gz
> cd gc6.1/ > ./configure > make > make check > su # make install
LD_LIBRARY_PATH $B$K%i%$%V%i%j$r%$%s%9%H!<%k@h$N%G%#%l%/%H%j$rF~$l$^$9!#(B (Linux $B$J$i(B ld.so.conf $B$K%$%s%9%H!<%k@h$N%G%#%l%/%H%j$rDI2C$7$F!"(B ldconfig $B%3%^%s%I$r# cp -r include /usr/local/include/gc