[Bug c++/40695] bogus may be used uninitialized in this function warning

2011-10-12 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40695

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC|gcc-bugs at gcc dot gnu.org |
 Resolution||FIXED

--- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com 2011-10-12 
17:06:23 UTC ---
Fixed in 4.5.x.


[Bug c++/40695] bogus may be used uninitialized in this function warning

2009-07-09 Thread manu at gcc dot gnu dot org


--- Comment #2 from manu at gcc dot gnu dot org  2009-07-09 15:55 ---
Thanks, it also happens in current trunk.


-- 

manu at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||manu at gcc dot gnu dot org
OtherBugsDependingO||24639
  nThis||
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-07-09 15:55:31
   date||


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



[Bug c++/40695] bogus may be used uninitialized in this function warning

2009-07-09 Thread shane dot beasley at aleri dot com


--- Comment #3 from shane dot beasley at aleri dot com  2009-07-10 04:37 
---
Another test case (should I file another bug?):

blockquote
struct Class
{
Class() { }
/* implicit copy constructor */
void Method() const; // undefined
/* Class has no data members */
};

void f(); // undefined

void g( Class x ) // pass by value
{
f();// call undefined function
x.Method(); // call method on parameter
}

void h()
{
Class x;
g( x );
}
blockquote

$ g++ -Wuninitialized -O3 -c -o /dev/null file.cpp
file.cpp: In function 'void h()':
file.cpp:20: warning: 'anonymous' is used uninitialized in this function
$ g++ -dumpversion
4.4.0

BTW: I'm just now trying to build our stuff with GCC 4.4.0. I've run into two
warnings. The first is comment 0. The second may or may not be similar to the
above, except that it has data members -- but still no copy constructor or
assignment operator (no need). For fun, I've added them and am rebuilding now.
If that doesn't fix the problem, I'll probably be back later. :)


-- 


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