This optimization is usually done with whole program analysis (WPA) or
with function cloning or inlining -- e.g., 'i' is an address of a
local variable in inlined/cloned callsite ...
David
On Sun, Jan 3, 2010 at 3:19 PM, Joshua Haberman wrote:
> By the way, here is one case I tested where I was
On Mon, Jan 4, 2010 at 12:19 AM, Joshua Haberman wrote:
> By the way, here is one case I tested where I was surprised GCC was not
> more aggressive:
>
> extern void bar();
> int foo(int *i) {
> if(*i) bar();
> return *i;
> }
>
> With GCC 4.4.1 -O3 (Ubuntu, x86-64) this reloads *i if bar i
By the way, here is one case I tested where I was surprised GCC was not
more aggressive:
extern void bar();
int foo(int *i) {
if(*i) bar();
return *i;
}
With GCC 4.4.1 -O3 (Ubuntu, x86-64) this reloads *i if bar is called. I
suppose you have to allow that either "i" or "*i" is acce
On Sun, Jan 3, 2010 at 11:54 PM, Joshua Haberman wrote:
> Richard Guenther gmail.com> writes:
>> On Sun, Jan 3, 2010 at 10:55 PM, Joshua Haberman
> gmail.com> wrote:
>> > This is why perfect warnings about this issue are not possible; if we
>> > see a downcast in isolation, we do not know if it
Snapshot gcc-4.3-20100103 is now available on
ftp://gcc.gnu.org/pub/gcc/snapshots/4.3-20100103/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 4.3 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches
Richard Guenther gmail.com> writes:
> On Sun, Jan 3, 2010 at 10:55 PM, Joshua Haberman
gmail.com> wrote:
> > This is why perfect warnings about this issue are not possible; if we
> > see a downcast in isolation, we do not know if it is undoing a previous
> > upcast or not. Only a tool like valg
On Sun, Jan 3, 2010 at 10:55 PM, Joshua Haberman wrote:
> Richard Guenther gmail.com> writes:
>> On Sun, Jan 3, 2010 at 6:46 AM, Joshua Haberman
> gmail.com> wrote:
>> > The aliasing policies that GCC implements seem to be more strict than
>> > what is in the C99 standard. I am wondering if thi
Patrick Horgan yahoo.com> writes:
> Since it would be hard to read this any other way, it seems then you-
> maintain that you found a bug in the standard, has it been brought up to-
> the committee? The latest draft I see still has that wording. Doesn't-
> seem to be on the radar for C1x.
I str
Andrew Haley redhat.com> writes:
> On 01/03/2010 10:53 AM, Richard Guenther wrote:
> > GCC follows its own documentation here, not some random
> > websites and maybe not the strict reading of the standard.
>
> GCC is compatible with C99 in this regard.
I do not believe this is true. Your argumen
Richard Guenther gmail.com> writes:
> On Sun, Jan 3, 2010 at 6:46 AM, Joshua Haberman
gmail.com> wrote:
> > The aliasing policies that GCC implements seem to be more strict than
> > what is in the C99 standard. I am wondering if this is true or whether
> > I am mistaken (I am not an expert on t
On 01/03/2010 12:52 PM, Andreas Schwab wrote:
> Florian Weimer writes:
>
>> * Joshua Haberman:
>>
>>> To me this allows the following:
>>>
>>> int i;
>>> union u { int x; } *pu = (union u*)&i;
>>> printf("%d\n", pu->x);
>>
>> I think the cast on the secodn line is undefined,
>
> Only if un
Richard Guenther wrote:
On Sun, Jan 3, 2010 at 6:46 AM, Joshua Haberman wrote:
... elision by patrick of part of a quote of 6.5 Expressions #7...
* an aggregate or union type that includes one of the aforementioned
types among its members (including, recursively, a member of a
subaggr
Vineet,
On Tue, 20 Oct 2009, Vineet Dwivedi wrote:
> The mirror is now directly syncing from gcc and can be accessed at
>
> http://mirror.vocabbuilder.net/gcc/
I was just going to add this to http://gcc.gnu.org/mirrors.html (sorry
for originally missing that), but noticed that it had not mirrore
Florian Weimer writes:
> * Joshua Haberman:
>
>> To me this allows the following:
>>
>> int i;
>> union u { int x; } *pu = (union u*)&i;
>> printf("%d\n", pu->x);
>
> I think the cast on the secodn line is undefined,
Only if union u has stricter alignment requirements than int; otherwise
y
* Joshua Haberman:
> To me this allows the following:
>
> int i;
> union u { int x; } *pu = (union u*)&i;
> printf("%d\n", pu->x);
I think the cast on the secodn line is undefined, not the access on
the third.
On 01/03/2010 10:53 AM, Richard Guenther wrote:
> GCC follows its own documentation here, not some random
> websites and maybe not the strict reading of the standard.
GCC is compatible with C99 in this regard.
Andrew.
On Sun, Jan 3, 2010 at 6:46 AM, Joshua Haberman wrote:
> The aliasing policies that GCC implements seem to be more strict than
> what is in the C99 standard. I am wondering if this is true or whether
> I am mistaken (I am not an expert on the standard, so the latter is
> definitely possible).
>
>
17 matches
Mail list logo