[Bug c++/19761] -Winit-self doesn't work anymore

2005-05-30 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-31 
02:41 ---
No you are thinking wrong, it will be the same warning as it is uninitialized, 
the flag just turns on the 
warnings for those cases.

-- 
   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19761


[Bug c++/19761] -Winit-self doesn't work anymore

2005-05-30 Thread oliverst at online dot de

--- Additional Comments From oliverst at online dot de  2005-05-31 01:29 
---
Yes, I did expect a different warning, because 

int i = i;

would be uninitialized use and self initialization.

And because of an special warnings flag I expected it to be different from the
uninitialized use warning. But if it causes the same, it should be part of
-Wuninitialized and -Winit-self would be kind of redundant then. Maybe I am just
seeing this totally wrong.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19761


[Bug c++/19761] -Winit-self doesn't work anymore

2005-05-30 Thread dannysmith at users dot sourceforge dot net

--- Additional Comments From dannysmith at users dot sourceforge dot net  
2005-05-30 21:03 ---
I can't reproduce this with either gcc-3.4.4 or 4.0.0 on mingw 

The example gives the warning
warning: 'i' might be used uninitialized in this function
iff I add -Winit-self

That is consistent with manual.

Are you expecuning a different warning?

Danny

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19761


[Bug c++/19761] -Winit-self doesn't work anymore

2005-03-31 Thread pinskia at gcc dot gnu dot org


-- 
   What|Removed |Added

   Attachment #8504|application/octet-stream|text/plain
  mime type||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19761


[Bug c++/19761] -Winit-self doesn't work anymore

2005-03-31 Thread oliverst at online dot de

--- Additional Comments From oliverst at online dot de  2005-03-31 11:36 
---
Created an attachment (id=8504)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8504&action=view)
preprocessed source


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19761


[Bug c++/19761] -Winit-self doesn't work anymore

2005-03-31 Thread oliverst at online dot de

--- Additional Comments From oliverst at online dot de  2005-03-31 11:35 
---
I tried it again with this GCC:

Using built-in specs.
Target: i686-pc-mingw32
Configured with: /datal/gcc/gcc/configure --prefix=/datal/gcc/build/wingcc
--build=i686-pc-linux-gnu --host=i686-pc-mingw32 --target=i686-pc-mingw32
--enable-languages=c,c++,java --with-gcc --with-gnu-as --with-gnu-ld
--enable-threads=win32 --disable-nls --disable-win32-registry --disable-shared
--disable-debug --without-newlib --enable-libgcj --disable-java-awt --without-x
--enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter
--enable-hash-synchronization --enable-sjlj-exceptions --enable-libgcj-multifile
--enable-libgcj-mingw-osapi=ansi
Thread model: win32
gcc version 4.0.0 20050324 (prerelease)

And I still get the same results as mentioned in comment 3. I also tried it with
"-Wno-unitialized" to see, if that warning somehow disables the -"Winit-self",
but I still don't get the expected warning.

Sorry, but reopening this bug. Maybe we should get a third opinion (another guy
with a 3.4.x or 4.0.x GCC) on this. Also attaching the preprocessed source.

-- 
   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|WORKSFORME  |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19761


[Bug c++/19761] -Winit-self doesn't work anymore

2005-02-03 Thread oliverst at online dot de

--- Additional Comments From oliverst at online dot de  2005-02-03 10:19 
---
strange...I just tried it again with this example:

extern void foo(int);

int main()
{
int i = i;
foo(i);
return i;
}

And I get only this (C and C++ front-end / -O1, -O2 and -O3):

$ gcc -Wuninitialized -Winit-self -O1 test.cpp
test.cpp: In function `int main()':
test.cpp:5: warning: 'i' might be used uninitialized in this function

Maybe it was fixed between GCC 3.4.2 and GCC 3.4.3? Or it's a target-specific
problem? I unfortunately don't have a linux GCC 3.4.2.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19761


[Bug c++/19761] -Winit-self doesn't work anymore

2005-02-02 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-02 
18:53 ---
This example works for me with both the C and C++ front-end. You must be making 
a mistake.

-- 
   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19761


[Bug c++/19761] -Winit-self doesn't work anymore

2005-02-02 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-02 
16:58 ---
There is a test in the testsuite for this so I don't understand why this is 
failing.

http://gcc.gnu.org/ml/gcc-testresults/2005-02/msg00072.html

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19761