Re: Compiler optimization help

2025-07-06 Thread Thomas de Bock via Gcc
mean I now know I cannot compare the type info in this way, but are there any already implemented functions that let you retrieve the vtable and the address of the base class vtable from a type that someone could point me to? From: Thomas de Bock Sent: 04 July 20

Re: Compiler support for forbidding certain methods from being called

2025-04-15 Thread Julian Waters via Gcc
Hi Jonathan, Thanks for the suggestion, it seems promising. I switched out the error attribute for the warning attribute at first, since they should be equivalent except warning just warns instead of erroring. This results in the link step failing if LTO is enabled for some reason though. I then c

Re: Compiler support for forbidding certain methods from being called

2025-04-14 Thread Jonathan Wakely via Gcc
On Mon, 14 Apr 2025 at 14:47, Julian Waters wrote: > > Hi Jonathan, > > Thanks for the suggestion, it seems promising. I switched out the > error attribute for the warning attribute at first, since they should > be equivalent except warning just warns instead of erroring. This > results in the lin

Re: Compiler support for forbidding certain methods from being called

2025-04-14 Thread Jonathan Wakely via Gcc
On Mon, 14 Apr 2025 at 11:53, Julian Waters wrote: > > Hi Jonathan, > > Yep, unfortunately #pragma GCC poison is far too restrictive, it > doesn't check if it is a function call to that particular banned > function, it restricts any and all use of that identifier in the code > altogether. Not only

Re: Compiler support for forbidding certain methods from being called

2025-04-14 Thread Jonathan Wakely via Gcc
On Mon, 14 Apr 2025 at 12:57, Jonathan Wakely wrote: > > On Mon, 14 Apr 2025 at 11:53, Julian Waters wrote: > > > > Hi Jonathan, > > > > Yep, unfortunately #pragma GCC poison is far too restrictive, it > > doesn't check if it is a function call to that particular banned > > function, it restricts

Re: Compiler support for forbidding certain methods from being called

2025-04-14 Thread Julian Waters via Gcc
Hi Jonathan, Yep, unfortunately #pragma GCC poison is far too restrictive, it doesn't check if it is a function call to that particular banned function, it restricts any and all use of that identifier in the code altogether. Not only does this mean you can't use overloads of a banned function, you

Re: Compiler support for forbidding certain methods from being called

2025-04-14 Thread Jonathan Wakely via Gcc
On Mon, 14 Apr 2025 at 10:11, Julian Waters via Gcc wrote: > > Hi all, > > A codebase I'm working with has decided that poisoning certain > standard library functions is necessary, as it explicitly does not use > those functions unless absolutely necessary for its own reasons (This > was not my de

Re: compiler

2021-05-02 Thread Frosku
On Sat, May 01, 2021 at 09:51:00PM -0700, Jaime Guzman Gaytan via Gcc wrote: > How can I get the compiler if I don't have internet in my apartment? Depending on what platform you're on, there should be a package (deb, rpm, etc) which you can download at i.e. work or a local library or university.

Re: Compiler support for erasure of sensitive data

2016-03-15 Thread Marcos Díaz
On Wed, Mar 9, 2016 at 2:09 PM, Segher Boessenkool wrote: > [ Please don't top-post. ] > > On Wed, Mar 09, 2016 at 11:23:22AM -0300, Andres Tiraboschi wrote: >> We are developing this feature for x86_64 >> I want to see which registers are being used by the current function >> for returning a valu

Re: Compiler support for erasure of sensitive data

2016-03-09 Thread Segher Boessenkool
[ Please don't top-post. ] On Wed, Mar 09, 2016 at 11:23:22AM -0300, Andres Tiraboschi wrote: > We are developing this feature for x86_64 > I want to see which registers are being used by the current function > for returning a value or as arguments. > I traverse the rtl looking for clobbered regis

Re: Compiler support for erasure of sensitive data

2016-03-09 Thread Andres Tiraboschi
We are developing this feature for x86_64 I want to see which registers are being used by the current function for returning a value or as arguments. I traverse the rtl looking for clobbered registers, but I don't know how to find which registers are arguments from the current function and which ar

Re: Compiler support for erasure of sensitive data

2016-03-04 Thread Segher Boessenkool
On Tue, Mar 01, 2016 at 10:27:00AM +0100, Richard Biener wrote: > > We were thinking on making a function attribute that ensures that non > > necessary registers, or stack frames used by the function will be correctly > > cleared before returning. > > We think in implementing for x86_64 as a firs

Re: Compiler support for erasure of sensitive data

2016-03-01 Thread Richard Biener
On Mon, Feb 29, 2016 at 10:14 PM, Marcos Diaz wrote: > Hi, we are facing the same issue. This bugzilla was opened: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69976 > > We were thinking on making a function attribute that ensures that non > necessary registers, or stack frames used by the func

Re: Compiler support for erasure of sensitive data

2016-02-29 Thread Marcos Diaz
Hi, we are facing the same issue. This bugzilla was opened: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69976 We were thinking on making a function attribute that ensures that non necessary registers, or stack frames used by the function will be correctly cleared before returning. We think in i

Re: [musl] Re: Compiler support for erasure of sensitive data

2015-10-22 Thread Denys Vlasenko
On Wed, Sep 9, 2015 at 10:26 PM, Szabolcs Nagy wrote: > * Zack Weinberg [2015-09-09 15:03:50 -0400]: >> On 09/09/2015 02:02 PM, paul_kon...@dell.com wrote: >> >> On Sep 9, 2015, at 1:54 PM, David Edelsohn >> >> wrote: >> >> >> >> What level of erasure of sensitive data are you trying to ensure?

Re: Compiler support for erasure of sensitive data

2015-09-09 Thread Szabolcs Nagy
* Zack Weinberg [2015-09-09 15:03:50 -0400]: > On 09/09/2015 02:02 PM, paul_kon...@dell.com wrote: > >> On Sep 9, 2015, at 1:54 PM, David Edelsohn > >> wrote: > >> > >> What level of erasure of sensitive data are you trying to ensure? > >> Assuming that overwriting values in the ISA registers a

Re: Compiler support for erasure of sensitive data

2015-09-09 Thread Zack Weinberg
On 09/09/2015 02:02 PM, paul_kon...@dell.com wrote: >> On Sep 9, 2015, at 1:54 PM, David Edelsohn >> wrote: >> >> What level of erasure of sensitive data are you trying to ensure? >> Assuming that overwriting values in the ISA registers actually >> completely clears and destroys the values is d

Re: Compiler support for erasure of sensitive data

2015-09-09 Thread David Edelsohn
On Wed, Sep 9, 2015 at 2:02 PM, wrote: > >> On Sep 9, 2015, at 1:54 PM, David Edelsohn wrote: >> >> On Wed, Sep 9, 2015 at 12:36 PM, Zack Weinberg wrote: >> >>> The ABI dictates basically everything you see. The call to >>> explicit_bzero has forced the compiler to *create* a second copy of >>

Re: Compiler support for erasure of sensitive data

2015-09-09 Thread Paul_Koning
> On Sep 9, 2015, at 1:54 PM, David Edelsohn wrote: > > On Wed, Sep 9, 2015 at 12:36 PM, Zack Weinberg wrote: > >> The ABI dictates basically everything you see. The call to >> explicit_bzero has forced the compiler to *create* a second copy of >> the variable `k` on the stack, just so it can

Re: Compiler support for erasure of sensitive data

2015-09-09 Thread David Edelsohn
On Wed, Sep 9, 2015 at 12:36 PM, Zack Weinberg wrote: > The ABI dictates basically everything you see. The call to > explicit_bzero has forced the compiler to *create* a second copy of > the variable `k` on the stack, just so it can be erased -- and the > copy in registers survives (at least for

Re: [musl] Re: Compiler support for erasure of sensitive data

2015-09-09 Thread Rich Felker
On Wed, Sep 09, 2015 at 12:58:36PM -0400, Zack Weinberg wrote: > On 09/09/2015 12:52 PM, paul_kon...@dell.com wrote: > > Then again, suppose all you had is explicit_bzero, and an annotation > > on the data saying it's sensitive. Can static code analyzers take > > care of the rest? If so, this sor

Re: Compiler support for erasure of sensitive data

2015-09-09 Thread Zack Weinberg
On 09/09/2015 12:52 PM, paul_kon...@dell.com wrote: > Then again, suppose all you had is explicit_bzero, and an annotation > on the data saying it's sensitive. Can static code analyzers take > care of the rest? If so, this sort of thing doesn't need to be in > the compiler. The thing that absolu

Re: Compiler support for erasure of sensitive data

2015-09-09 Thread Paul_Koning
> On Sep 9, 2015, at 12:36 PM, Zack Weinberg wrote: > > ... > I think the ideal feature addition to address this would be > >void safe(void) >{ >struct key __attribute__((sensitive)) k = get_key(); >use_key(k); >} That certainly is a cleaner answer. What is attract

Re: Compiler support for erasure of sensitive data

2015-09-09 Thread Zack Weinberg
OK, I have now failed to find the LLVM development list twice in a row. Could some kind soul please forward the message to whereever the heck the proper address is? zw

Re: Compiler warnings while compiling gcc with clang‏

2015-05-06 Thread Martin Uecker
Am Tue, 5 May 2015 21:37:10 -0700 Andrew Pinski : > On Tue, May 5, 2015@9:00 PM, Aditya K wrote: > >>> > >>> gcc/rtlanal.c:5573:23: warning: array index 1 is past the end of the > >>> array (which contains 1 element) [-Warray-bounds] > >>> ../../gcc/rtlanal.c:5573:23: warning: array index 1 is p

Re: Compiler warnings while compiling gcc with clang‏

2015-05-05 Thread Andrew Pinski
On Tue, May 5, 2015 at 9:00 PM, Aditya K wrote: > > > >> CC: jwakely@gmail.com; renato.go...@linaro.org; gcc@gcc.gnu.org >> From: pins...@gmail.com >> Subject: Re: Compiler warnings while compiling gcc with clang‏ >&g

RE: Compiler warnings while compiling gcc with clang‏

2015-05-05 Thread Aditya K
> CC: jwakely@gmail.com; renato.go...@linaro.org; gcc@gcc.gnu.org > From: pins...@gmail.com > Subject: Re: Compiler warnings while compiling gcc with clang‏ > Date: Tue, 5 May 2015 20:19:04 -0700 > To: hiradi...@msn.com > > > &

Re: Compiler warnings while compiling gcc with clang‏

2015-05-05 Thread pinskia
cc/gcov-tool.c:493:7: warning: variable 'ret' is used uninitialized > whenever 'if' condition is false [-Wsometimes-uninitialized] > if (argc - optind == 2) > ^~ > ../../gcc/gcov-tool.c:498:10: note: uninitialized use occurs here > retu

RE: Compiler warnings while compiling gcc with clang‏

2015-05-05 Thread Aditya K
~ ../../gcc/gcov-tool.c:462:10: note: initialize the variable 'ret' to silence this warning   int ret;          ^           = 0 I think I can fix few of these if we want them to be fixed. For some e.g. ( gcc/gcov-tool.c:225:7: warning: array index 1 is past the end of the

Re: Compiler warnings while compiling gcc with clang‏

2015-05-05 Thread Jonathan Wakely
On 5 May 2015 at 12:39, Aditya K wrote: > There are however, other differences between class and struct > (http://stackoverflow.com/a/999810/811335) i.e., > > 1. In absence of an access-specifier for a base class, public is assumed when > the derived class is declared struct and private is assume

Re: Compiler warnings while compiling gcc with clang‏ -- clang compilation speed on building GCC

2015-05-05 Thread Vladimir Makarov
On 05/05/2015 12:42 AM, Aditya K wrote: I was able to successfully bootstrap gcc by using clang as the stage 1 compiler. I configured gcc using the following arguments. ../configure --disable-multilib --enable-bootstrap --enable-languages=c,c++ CC=/work/llvm/install-release/bin/clang CXX=/wor

RE: Compiler warnings while compiling gcc with clang‏

2015-05-05 Thread Aditya K
> CC: hiradi...@msn.com; gcc@gcc.gnu.org > From: pins...@gmail.com > Subject: Re: Compiler warnings while compiling gcc with clang‏ > Date: Tue, 5 May 2015 01:11:38 -0700 > To: renato.go...@linaro.org > > > > > >> On M

Re: Compiler warnings while compiling gcc with clang‏

2015-05-05 Thread Renato Golin
On 5 May 2015 at 11:23, Trevor Saunders wrote: > Saying forward declaration should be done with class is a value choice > you've made. Yes. > Given forward declarations with struct and class are > interchangable it seems like a perfectly valid choice to me to decide > you don't care to bother

Re: Compiler warnings while compiling gcc with clang‏

2015-05-05 Thread Trevor Saunders
On Tue, May 05, 2015 at 09:00:59AM +0100, Renato Golin wrote: > On 5 May 2015 at 05:58, Andrew Pinski wrote: > > These two are bogus and really clang in GCC's mind. The main reason > > is the standard says struct and class are the same thing. > > Apart from the fact that classes are private by d

Re: Compiler warnings while compiling gcc with clang‏

2015-05-05 Thread Trevor Saunders
On Tue, May 05, 2015 at 04:42:02AM +, Aditya K wrote: > I was able to successfully bootstrap gcc by using clang as the stage 1 > compiler. I configured gcc using the following arguments. > > ../configure --disable-multilib --enable-bootstrap --enable-languages=c,c++ > CC=/work/llvm/install-r

Re: Compiler warnings while compiling gcc with clang‏

2015-05-05 Thread pinskia
> On May 5, 2015, at 1:00 AM, Renato Golin wrote: > >> On 5 May 2015 at 05:58, Andrew Pinski wrote: >> These two are bogus and really clang in GCC's mind. The main reason >> is the standard says struct and class are the same thing. > > Apart from the fact that classes are private by defaul

Re: Compiler warnings while compiling gcc with clang‏

2015-05-05 Thread Renato Golin
On 5 May 2015 at 05:58, Andrew Pinski wrote: > These two are bogus and really clang in GCC's mind. The main reason > is the standard says struct and class are the same thing. Apart from the fact that classes are private by default and structs are not. They may be similar for layout purposes, and

Re: Compiler warnings while compiling gcc with clang‏

2015-05-04 Thread Andrew Pinski
On Mon, May 4, 2015 at 9:42 PM, Aditya K wrote: > I was able to successfully bootstrap gcc by using clang as the stage 1 > compiler. I configured gcc using the following arguments. > > ../configure --disable-multilib --enable-bootstrap --enable-languages=c,c++ > CC=/work/llvm/install-release/bin

Re: compiler output conflict

2014-05-25 Thread Jakub Jelinek
On Sun, May 25, 2014 at 03:55:38PM -0700, John wrote: > I ran across this puzzling difference between gcc and llvm today and think > the specification to produce consistent output for this code should be worked > out. > http://stackoverflow.com/questions/15929795/llvm-and-gcc-different-output-sam

Re: Compiler speed (vanilla vs. LTO, PGO and LTO+PGO)

2013-03-28 Thread Jan Hubicka
> Interesting, I was able to get faste LTO+PGO compile times than non-LTO,PGO. > I however did testng only on combine.c compliation, so not very scientific. > > There are some cases FDO information is not streamed well in all cases. I > will > post patch for that later today. Perhaps it will ma

Re: Re: Compiler speed (vanilla vs. LTO, PGO and LTO+PGO)

2013-03-26 Thread gcc_mailinglist
-Ursprüngliche Nachricht- Gesendet: Dienstag, 26 März 2013 um 12:13:26 Uhr Von: "Jan Hubicka" An: "Markus Trippelsdorf" Betreff: Re: Compiler speed (vanilla vs. LTO, PGO and LTO+PGO) > Yes, the binary size is 8-10% smaller. Unfortunately there are no performance

Re: Compiler speed (vanilla vs. LTO, PGO and LTO+PGO)

2013-03-26 Thread Jan Hubicka
> Yes, the binary size is 8-10% smaller. Unfortunately there are no performance > improvements. > > LTO+PGO-disable-plugin: > -rwxr-xr-x 1 markus markus 15025568 Mar 25 15:49 cc1 > -rwxr-xr-x 1 markus markus 16198584 Mar 25 15:49 cc1plus > -rwxr-xr-x 1 markus markus 13907328 Mar 25 15:49 lto1 > -r

Re: Compiler speed (vanilla vs. LTO, PGO and LTO+PGO)

2013-03-25 Thread Markus Trippelsdorf
On 2013.03.25 at 15:17 +0100, Richard Biener wrote: > On Mon, Mar 25, 2013 at 2:24 PM, Markus Trippelsdorf > wrote: > > On 2013.03.25 at 14:11 +0100, Richard Biener wrote: > >> On Mon, Mar 25, 2013 at 1:56 PM, Markus Trippelsdorf > >> wrote: > >> > On 2013.03.25 at 08:06 +0100, Markus Trippelsdor

Re: Compiler speed (vanilla vs. LTO, PGO and LTO+PGO)

2013-03-25 Thread Richard Biener
On Mon, Mar 25, 2013 at 2:24 PM, Markus Trippelsdorf wrote: > On 2013.03.25 at 14:11 +0100, Richard Biener wrote: >> On Mon, Mar 25, 2013 at 1:56 PM, Markus Trippelsdorf >> wrote: >> > On 2013.03.25 at 08:06 +0100, Markus Trippelsdorf wrote: >> >> On 2013.03.24 at 20:53 +0100, gcc_mailingl...@abw

Re: Compiler speed (vanilla vs. LTO, PGO and LTO+PGO)

2013-03-25 Thread Markus Trippelsdorf
On 2013.03.25 at 14:11 +0100, Richard Biener wrote: > On Mon, Mar 25, 2013 at 1:56 PM, Markus Trippelsdorf > wrote: > > On 2013.03.25 at 08:06 +0100, Markus Trippelsdorf wrote: > >> On 2013.03.24 at 20:53 +0100, gcc_mailingl...@abwesend.de wrote: > >> > > >> > is it useful to compile gcc 4.8.0 wit

Re: Compiler speed (vanilla vs. LTO, PGO and LTO+PGO)

2013-03-25 Thread Markus Trippelsdorf
On 2013.03.25 at 06:07 -0700, Andi Kleen wrote: > Markus Trippelsdorf writes: > > > > So it appears, contrary to the advice given above, that it is not useful > > to build gcc 4.8.0 with the lto option at the moment. > > Did you build firefox/kernel with debug info on/off? > > Often debug info o

Re: Compiler speed (vanilla vs. LTO, PGO and LTO+PGO)

2013-03-25 Thread Richard Biener
On Mon, Mar 25, 2013 at 1:56 PM, Markus Trippelsdorf wrote: > On 2013.03.25 at 08:06 +0100, Markus Trippelsdorf wrote: >> On 2013.03.24 at 20:53 +0100, gcc_mailingl...@abwesend.de wrote: >> > >> > is it useful to compile gcc 4.8.0 with the lto option? >> >> If you want a (slightly) faster compiler

Re: Compiler speed (vanilla vs. LTO, PGO and LTO+PGO)

2013-03-25 Thread Andi Kleen
Markus Trippelsdorf writes: > > So it appears, contrary to the advice given above, that it is not useful > to build gcc 4.8.0 with the lto option at the moment. Did you build firefox/kernel with debug info on/off? Often debug info on changes the compiler performance significantly, as it generate

Re: Compiler crash with block numbers

2012-09-21 Thread Richard Guenther
On Thu, Sep 20, 2012 at 11:59 PM, Dehao Chen wrote: > Hi, Ian, > > This patch fixed the bootstrap problem, as well as the problem posted > in http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01441.html > > However, the libstdc++ problem is not fixed, they are related to the > my line_table implementat

Re: Compiler crash with block numbers

2012-09-20 Thread Dehao Chen
Hi, Ian, This patch fixed the bootstrap problem, as well as the problem posted in http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01441.html However, the libstdc++ problem is not fixed, they are related to the my line_table implementation for PCH. I'll send another patch later for that. Shall I sti

Re: Compiler crash with block numbers

2012-09-20 Thread Dehao Chen
IS_UNKNOWN_LOCATION checks if the source location is unknown. == UNKNONW_LOCATION checks if source location is unknown and the block is NULL. Yes, they are error-prone, I'll have a separate patch to clean up IS_UNKNOWN_LOCATION later. On Fri, Sep 21, 2012 at 4:17 AM, Ian Lance Taylor wrote: > On

Re: Compiler crash with block numbers

2012-09-20 Thread Ian Lance Taylor
On Thu, Sep 20, 2012 at 12:59 PM, Dehao Chen wrote: > > gcc/ChangeLog: > tree-eh.c (lower_try_finally_dup_block): Use correct way to > check unknown location. While you think about my questions, let's fix the bootstrap. This patch is OK if it passes bootstrap and a gcc and libstdc++ test

Re: Compiler crash with block numbers

2012-09-20 Thread Ian Lance Taylor
On Thu, Sep 20, 2012 at 12:59 PM, Dehao Chen wrote: > The bug is in tree-eh.c. IS_UNKNOWN_LOCATION is mistakenly used, thus > the block info for a call stmt is cleared. > > A patch to fix the problem is atached: > > gcc/ChangeLog: > tree-eh.c (lower_try_finally_dup_block): Use correct way

Re: Compiler crash with block numbers

2012-09-20 Thread Dehao Chen
The bug is in tree-eh.c. IS_UNKNOWN_LOCATION is mistakenly used, thus the block info for a call stmt is cleared. A patch to fix the problem is atached: gcc/ChangeLog: tree-eh.c (lower_try_finally_dup_block): Use correct way to check unknown location. Index: tree-eh.c

Re: Compiler crash with block numbers

2012-09-20 Thread H.J. Lu
On Thu, Sep 20, 2012 at 11:46 AM, Dehao Chen wrote: > Sure, I'll look into this problem today. > > Thanks, > Dehao > > On Fri, Sep 21, 2012 at 2:25 AM, Ian Lance Taylor wrote: >> Hi Dehao, I suspect that your recent patch changing block handling has >> broken bootstrap with --enable-languages=go.

Re: Compiler crash with block numbers

2012-09-20 Thread Dehao Chen
Sure, I'll look into this problem today. Thanks, Dehao On Fri, Sep 21, 2012 at 2:25 AM, Ian Lance Taylor wrote: > Hi Dehao, I suspect that your recent patch changing block handling has > broken bootstrap with --enable-languages=go. I reduced the test case > to this C++ code: > > #include > > s

Re: compiler operations research

2010-04-07 Thread roy rosen
Thanks Dave, I'll have a look at these. Roy. 2010/4/7, Dave Korn : > On 07/04/2010 12:29, roy rosen wrote: > > Hi, > > > > Are there any known methodologies/tools/flows that enable operations > > research on the compiler generated assembly? > > Something like MILEPOST+ICI? An automated machine

Re: compiler operations research

2010-04-07 Thread Dave Korn
On 07/04/2010 12:29, roy rosen wrote: > Hi, > > Are there any known methodologies/tools/flows that enable operations > research on the compiler generated assembly? Something like MILEPOST+ICI? An automated machine learning version of gcc: http://ctuning.org/wiki/index.php/CTools:MilepostGCC h

Re: Compiler option for SSE4

2010-03-23 Thread Tim Prince
On 3/23/2010 11:02 PM, Rayne wrote: I'm using GCC 4.1.2 20070626 on a server with Intel Xeon X5570. How do I turn on the compiler option for SSE4? I've tried -msse4, -msse4.1 and -msse4.2, but they all returned the error message cc1: error: unrecognized command line option "-msse4.1" (for whic

Re: Compiler for gcc

2009-08-08 Thread Michael Hope
Hi Harshal. I'm no expert, but GCC can be built by another C compiler. If you have a look at how GCC builds you'll see that it goes through a few stages - the first is where the local C compiler builds a first version of GCC, and then this new version of GCC is used to build itself. The same tec

Re: Compiler turns off warnings unexpectedly

2009-01-02 Thread Jakub Jelinek
On Thu, Jan 01, 2009 at 03:11:52AM +0100, Jan Engelhardt wrote: > > On Thursday 2009-01-01 03:05, Andrew Pinski wrote: > >On Wed, Dec 31, 2008 at 9:02 PM, Jan Engelhardt wrote: > >> Hi, > >> > >> > >> I have here an (attached) testcase which unexpectedly turns off > >> warnings. Compiling it usin

Re: Compiler turns off warnings unexpectedly

2009-01-02 Thread Paolo Bonzini
I have here an (attached) testcase which unexpectedly turns off warnings. Compiling it using `gcc test.c -c -Wall` (or test.i) gives: test.c: In function 'pam_sm_authenticate': test.c:6: warning: implicit declaration of function 'undef' >>> This works on the trunk but fail

Re: Compiler turns off warnings unexpectedly

2009-01-02 Thread Dodji Seketeli
Jan Engelhardt a écrit : On Thursday 2009-01-01 03:05, Andrew Pinski wrote: On Wed, Dec 31, 2008 at 9:02 PM, Jan Engelhardt wrote: Hi, I have here an (attached) testcase which unexpectedly turns off warnings. Compiling it using `gcc test.c -c -Wall` (or test.i) gives: test.c: In function 'p

Re: Compiler turns off warnings unexpectedly

2008-12-31 Thread Jan Engelhardt
On Thursday 2009-01-01 03:05, Andrew Pinski wrote: >On Wed, Dec 31, 2008 at 9:02 PM, Jan Engelhardt wrote: >> Hi, >> >> >> I have here an (attached) testcase which unexpectedly turns off >> warnings. Compiling it using `gcc test.c -c -Wall` (or test.i) gives: >> >> test.c: In function 'pam_sm_aut

Re: Compiler turns off warnings unexpectedly

2008-12-31 Thread Andrew Pinski
On Wed, Dec 31, 2008 at 9:02 PM, Jan Engelhardt wrote: > Hi, > > > I have here an (attached) testcase which unexpectedly turns off > warnings. Compiling it using `gcc test.c -c -Wall` (or test.i) gives: > > test.c: In function 'pam_sm_authenticate': > test.c:6: warning: implicit declaration of fun

Re: Compiler error w/ templates and default argument value

2008-10-10 Thread James Dennett
2008/10/10 Peter A. Felvegi <[EMAIL PROTECTED]> > > Hello All, > > I've run into this: > > 8<8<8< > template > class B > { > protected: >static const int i = 42; > }; > > template > class D : protected B > { > public: >D(int n_ = B::i); // line 12 > }; > 8<8<

Re: compiler slowdown in 4.3 development

2008-03-03 Thread Bruno Haible
> Was it configured with --enable-checking=release? No it wasn't. Bruno

Re: compiler slowdown in 4.3 development

2008-03-03 Thread David Daney
Bruno Haible wrote: Hi, Here's a case of a function whose compilation with -O2 -g (the default with autoconf) on Linux/x86 has slowed down by 67% since the 4.2.2 release. $ time gcc -c -O2 -g -Wall sha512.c Measured user time. gcc 3.2.2 42.2 sec gcc 3.3.6 71 sec gcc 3.4.4

Re: Compiler fails to find header files.

2007-11-27 Thread NightStrike
On Nov 27, 2007 8:42 PM, mofomojo <[EMAIL PROTECTED]> wrote: > P.S. I sent the same help info to the [EMAIL PROTECTED] address as > well and have yet to receive any response after about 3 hours. Thank > you very much for reading this. That is outrageous! 3 Hours? I will send an immediate TPS rep

Re: compiler chain on AIX

2007-08-27 Thread Ian Lance Taylor
"Ed S. Peschko" <[EMAIL PROTECTED]> writes: > As I'm going through, yes I can make mods to work around these bugs, but it > sure is > a pain.. It would be much easier if gnu-ld simply *worked* on AIX (and of > course AIX > stopped shipping broken libraries) I did the initial GNU ld port to AIX

Re: compiler chain on AIX

2007-08-26 Thread David Edelsohn
> Ed S Peschko writes: Ed> Here's a couple quick ones for you, one that I've had some luck at unwinding - Ed> The gcc compiler has a flag '-b' which also is used by the underlying linker. Ed> If I for example, change: Ed> gcc -bmaxdata:0x8000 Ed> to Ed> gcc -Wl,-bmaxdata:0x800

Re: compiler chain on AIX

2007-08-25 Thread Ed S. Peschko
Well, Here's a couple quick ones for you, one that I've had some luck at unwinding - The gcc compiler has a flag '-b' which also is used by the underlying linker. If I for example, change: gcc -bmaxdata:0x8000 to gcc -Wl,-bmaxdata:0x800 then I have better luck compili

Re: compiler chain on AIX

2007-08-24 Thread David Edelsohn
> Ed S Peschko writes: Ed> which would be fine if the AIX linker works, but I'm getting segmentation Ed> faults when compiling perl out of the box, using the gcc-4.1.0 compiler Ed> provided.. I'm wondering if its the compiler, the linker, or both... You have not provided information f

Re: Compiler support for write barrier insertion ?

2007-07-23 Thread Ian Lance Taylor
Basile STARYNKEVITCH <[EMAIL PROTECTED]> writes: > Given that my copyright assignment is ok (and I already got small > patches accepted) what is the way to make branches, in particular with > GPLv3? I don't want to mess with copyrights & license files, so I am > waiting a few weeks for these quest

Re: Compiler support for write barrier insertion ?

2007-07-23 Thread Basile STARYNKEVITCH
Dmitry Antipov wrote: Hello all, I have a question about possible cooperation between the compiler and hypothetical garbage collector. Unfortunately, my experience around GCC internals is too small, so I would like to ask compiler specialists before re-inventing an ugly bicycle... The most

Re: Compiler support for write barrier insertion ?

2007-07-23 Thread Andrew Haley
Dmitry Antipov writes: > > with write barrier inside ? The short answers are: > 1) If 'struct obj' has 100 trapped members, having 100 set_XXX functions > or macros just to set the fields is ugly; > 2) Migration from explicit memory management to garbage collection - if you > h

Re: Compiler loop optimizations

2006-12-29 Thread Ian Lance Taylor
Christian Sturn <[EMAIL PROTECTED]> writes: > On Fri, 29 Dec 2006 15:03:51 -0500 > Robert Dewar <[EMAIL PROTECTED]> wrote: > > > > There is no support for dumping actual valid source code, though, > > > and it is unlikely that there ever will be. > > > > And indeed it is not in general possible,

Re: Compiler loop optimizations

2006-12-29 Thread Christian Sturn
On Fri, 29 Dec 2006 15:03:51 -0500 Robert Dewar <[EMAIL PROTECTED]> wrote: > > There is no support for dumping actual valid source code, though, > > and it is unlikely that there ever will be. > > And indeed it is not in general possible, there are many optimizations > that cannot be expressed in

Re: Compiler loop optimizations

2006-12-29 Thread Robert Dewar
Ian Lance Taylor wrote: Christian Sturn <[EMAIL PROTECTED]> writes: Thank you for your answer. Is there any chance to have gcc dump out an optimized code in the form the source level language, e.g. can I run gcc with some optimizations and see how the compiler modified my C source code? You

Re: Compiler loop optimizations

2006-12-29 Thread Ian Lance Taylor
Christian Sturn <[EMAIL PROTECTED]> writes: > Thank you for your answer. Is there any chance to have gcc dump out > an optimized code in the form the source level language, e.g. can I run > gcc with some optimizations and see how the compiler modified my C > source code? You can get an approxima

Re: Compiler loop optimizations

2006-12-29 Thread Christian Sturn
> > 1) For the function foo10: > > The if-block following "if( i == 15 )" will be never executed since > > 'i' will never become 15 here. So, this entire block could be > > removed without changing the semantics. This would improve the > > program execution since the if-condition does not need to b

Re: Compiler loop optimizations

2006-12-28 Thread Daniel Berlin
On 12/28/06, Christian Sturz <[EMAIL PROTECTED]> wrote: Hi, I was curious if there are any gcc compiler optimizations that can improve this code: void foo10( ) { for ( int i = 0; i < 10; ++i ) { [...] if( i == 15 ) { [BLOCK1] } } } void foo100( ) { for ( int i = 0; i < 100; ++i

Re: [Fwd: Re: compiler interpretation of *mptr++ = mptr]

2005-03-31 Thread Joseph S. Myers
On Thu, 31 Mar 2005, Ajoy K Thamattoor wrote: > > A colleague of mine pointed out gcc gave warnings on the following > constructs. I understand a strictly conforming implementation is allowed > to warn on anything, but some of these are actually valid constructs. > Wanted clarification on wh

[Fwd: Re: compiler interpretation of *mptr++ = mptr]

2005-03-31 Thread Ajoy K Thamattoor
A colleague of mine pointed out gcc gave warnings on the following constructs. I understand a strictly conforming implementation is allowed to warn on anything, but some of these are actually valid constructs. Wanted clarification on why gcc wants to provide sequence-point warnings on these. P

Re: Compiler chokes on a simple template - why?

2005-03-17 Thread Jonathan Wakely
On Thu, Mar 17, 2005 at 11:03:53AM +0100, Giovanni Bajo wrote: > Topi Maenpaa <[EMAIL PROTECTED]> wrote: > > > The funny thing is that if I change the name of the "test2" function > > to "test", everything is OK. The compiler complains only if the > > functions have different names. Why does the

Re: Compiler chokes on a simple template - why?

2005-03-17 Thread Jonathan Wakely
On Thu, Mar 17, 2005 at 10:33:54AM +0200, Topi Maenpaa wrote: > Hi, > > Here is a snippet that does not compile with gcc 3.4.1 (on Mandrake 10.1). > > --- > template class A > { > public: > template void test(T value) {} > }; > > template voi

Re: Compiler chokes on a simple template - why?

2005-03-17 Thread Giovanni Bajo
Topi Maenpaa <[EMAIL PROTECTED]> wrote: > --- > template class A > { > public: > template void test(T value) {} > }; > > template void test2(A& a, T val) > { > a.test(val); > } > > int main() > { > A a; > a.test(1); //works fine > } >