[Bug middle-end/33279] Failed to warn uninitialized stack variable

2007-09-02 Thread pinskia at gcc dot gnu dot org
--- Comment #10 from pinskia at gcc dot gnu dot org 2007-09-02 17:19 --- As mentioned by Richard and I, this bug is invalid. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added ---

[Bug middle-end/33279] Failed to warn uninitialized stack variable

2007-09-02 Thread rguenth at gcc dot gnu dot org
--- Comment #9 from rguenth at gcc dot gnu dot org 2007-09-02 14:03 --- "What does bar get back to? Are you saying if a pointer is passed to bar, it can get back to any original struct where the pointer is a field?" No, but if you pass a pointer to a field of a struct the callee may der

[Bug middle-end/33279] Failed to warn uninitialized stack variable

2007-09-02 Thread pinskia at gmail dot com
--- Comment #8 from pinskia at gmail dot com 2007-09-02 14:02 --- Subject: Re: Failed to warn uninitialized stack variable On 2 Sep 2007 13:58:23 -, hjl at lucon dot org <[EMAIL PROTECTED]> wrote: > > If you can write such a function, I can pass you a pointer and your function > wi

Re: [Bug middle-end/33279] Failed to warn uninitialized stack variable

2007-09-02 Thread Andrew Pinski
On 2 Sep 2007 13:58:23 -, hjl at lucon dot org <[EMAIL PROTECTED]> wrote: > > If you can write such a function, I can pass you a pointer and your function > will be wrong. yes so but that call would be undefined, not the one we are talking about currently. --Pinski

[Bug middle-end/33279] Failed to warn uninitialized stack variable

2007-09-02 Thread pinskia at gmail dot com
--- Comment #7 from pinskia at gmail dot com 2007-09-02 14:01 --- Subject: Re: Failed to warn uninitialized stack variable On 2 Sep 2007 13:56:13 -, hjl at lucon dot org <[EMAIL PROTECTED]> wrote: > What does bar get back to? Are you saying if a pointer is passed to bar, > it can g

Re: [Bug middle-end/33279] Failed to warn uninitialized stack variable

2007-09-02 Thread Andrew Pinski
On 2 Sep 2007 13:56:13 -, hjl at lucon dot org <[EMAIL PROTECTED]> wrote: > What does bar get back to? Are you saying if a pointer is passed to bar, > it can get back to any original struct where the pointer is a field? It only matters at the context at the point bar is called with the struct

[Bug middle-end/33279] Failed to warn uninitialized stack variable

2007-09-02 Thread hjl at lucon dot org
--- Comment #6 from hjl at lucon dot org 2007-09-02 13:58 --- (In reply to comment #5) > > What does bar get back to? Are you saying if a pointer is passed to bar, > it can get back to any original struct where the pointer is a field? > If you can write such a function, I can pass yo

[Bug middle-end/33279] Failed to warn uninitialized stack variable

2007-09-02 Thread hjl at lucon dot org
--- Comment #5 from hjl at lucon dot org 2007-09-02 13:56 --- (In reply to comment #4) > bar (frame.value); > That call to bar causes the whole frame struct escapes here, not just the > array > element. > > void bar (mpz_t); > is really: > void bar(int*); > > because of array deca

[Bug middle-end/33279] Failed to warn uninitialized stack variable

2007-09-02 Thread pinskia at gcc dot gnu dot org
--- Comment #4 from pinskia at gcc dot gnu dot org 2007-09-02 13:43 --- bar (frame.value); That call to bar causes the whole frame struct escapes here, not just the array element. void bar (mpz_t); is really: void bar(int*); because of array decaying in parameters. Again with poin

[Bug middle-end/33279] Failed to warn uninitialized stack variable

2007-09-02 Thread hjl at lucon dot org
--- Comment #3 from hjl at lucon dot org 2007-09-02 13:37 --- > Subject: Re: New: Failed to warn uninitialized stack variable > > > Not really because this is the same as > bar (&frame.value[0]); > > Where bar can do pointer tricks to get back to original struct and > then change prev

[Bug middle-end/33279] Failed to warn uninitialized stack variable

2007-09-02 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2007-09-02 13:32 --- As mentioned by me in comment #1, we cannot warn about this. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

[Bug middle-end/33279] Failed to warn uninitialized stack variable

2007-09-02 Thread pinskia at gmail dot com
--- Comment #1 from pinskia at gmail dot com 2007-09-02 13:26 --- Subject: Re: New: Failed to warn uninitialized stack variable On 2 Sep 2007 13:19:45 -, hjl at lucon dot org <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] uninit-2]$ cat x.c > typedef int mpz_t[1]; > typedef struct