Re: dead code remover under gcc -O and higher(Is there a flag to do this)

2017-12-03 Thread chengjian (D)
On 2017/12/4 10:25, carl hansen wrote: line 12 , you say "void A( );" say instead: void A(){}; That solved it for me, using gcc7.2 Yeah, I miss the implementation, but I did this on purpose I'm curious is there any options to eliminate this. like gcc -O2 do. thanks.

Re: dead code remover under gcc -O and higher(Is there a flag to do this)

2017-12-03 Thread carl hansen
line 12 , you say "void A( );" say instead: void A(){}; That solved it for me, using gcc7.2 On Sun, Dec 3, 2017 at 4:56 PM, chengjian (D) wrote: > I have written a simple code like this > > ```c > #include > #include > > //#define CONFIG_TARGET_X86_64 > > #ifdef CONFIG_TARGET_X86_64 > static

dead code remover under gcc -O and higher(Is there a flag to do this)

2017-12-03 Thread chengjian (D)
I have written a simple code like this ```c #include #include //#define CONFIG_TARGET_X86_64 #ifdef CONFIG_TARGET_X86_64 static void A( ) { printf("A\n"); } #else void A( ); #endif static void B( ) { printf("B\n"); } static int xx( ) { #ifdef CONFIG_TARGET_X86_64 return 1; #else

gcc-8-20171203 is now available

2017-12-03 Thread gccadmin
Snapshot gcc-8-20171203 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/8-20171203/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 8 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/trunk revision

Re: TLS details on Linux for x86 and x64

2017-12-03 Thread Andrew Haley
On 03/12/17 10:50, Jakub Jelinek wrote: > On Sat, Dec 02, 2017 at 05:00:23PM +, Andrew Haley wrote: >> On 02/12/17 14:04, Liu Hao wrote: >>> >>> 0) What is the magical `@tpoff` suffix supposed to do? The `@ntpoff` and >>> `@dtpoff` things are documented in System V ABI but there doesn't seem >>

Re: TLS details on Linux for x86 and x64

2017-12-03 Thread Liu Hao
On 2017/12/3 18:50, Jakub Jelinek wrote: > Well, for GNU TLS (rather than GNU2) you want to read > https://www.akkadia.org/drepper/tls.pdf > > Jakub > Thank you too. I am thinking about migrating the technique used by GCC on Linux to Windows, minimizing modification by our side, since it s

Re: TLS details on Linux for x86 and x64

2017-12-03 Thread Jakub Jelinek
On Sat, Dec 02, 2017 at 05:00:23PM +, Andrew Haley wrote: > On 02/12/17 14:04, Liu Hao wrote: > > > > 0) What is the magical `@tpoff` suffix supposed to do? The `@ntpoff` and > > `@dtpoff` things are documented in System V ABI but there doesn't seem > > to be anything about `@tpoff`. > > 1) Ho

Re: TLS details on Linux for x86 and x64

2017-12-03 Thread Liu Hao
On 2017/12/3 1:00, Andrew Haley wrote: > Have you read > > https://www.fsfla.org/~lxoliva/writeups/TLS/RFC-TLSDESC-x86.txt > > ? > No. Well, will do. Thanks for the information. -- Best regards, LH_Mouse