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
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
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
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
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
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
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
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.
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
[ 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
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
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
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
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
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?
* 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
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
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
>>
> 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
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
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
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
> 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
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
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
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
> 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
>
>
>
&
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
~
../../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
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
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
> 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
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
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
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
> 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
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
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
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
> 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
-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
> 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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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<
> Was it configured with --enable-checking=release?
No it wasn't.
Bruno
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
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
"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
> 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
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
> 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
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
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
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
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,
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
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
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
> > 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
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
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
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
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
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
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
> }
>
87 matches
Mail list logo