[Bug c++/47861] static variables inside member functions

2011-02-24 Thread michal.t at tiscali dot it
...I only tried to explain my point of view...you and the rest of the bugzilla team know what to do. Thank you all so much! Messaggio originale Da: gcc-bugzilla@gcc. gnu.org Data: 24/02/2011 12.27 A: Ogg: [Bug c++/47861] static variables inside member functions http://gcc.gnu. org/bugz

[Bug c++/47861] static variables inside member functions

2011-02-24 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47861 --- Comment #11 from Jonathan Wakely 2011-02-24 11:27:51 UTC --- (In reply to comment #10) > > oo.cc:4:3: Warning: 'it' is declared as a function-scope > static, error prone, see static member variables No, it is not "error prone" - it is valid

[Bug c++/47861] static variables inside member functions

2011-02-24 Thread michal.t at tiscali dot it
going to search for the static var definition. Messaggio originale Da: gcc-bugzi...@gcc.gnu.org Data: 24/02/2011 11.44 A: Ogg: [Bug c++/47861] static variables inside member functions http://gcc.gnu. org/bugzilla/show_bug.cgi?id=47861 --- Comment #8 from Jonathan Wakely 2011-02-24

[Bug c++/47861] static variables inside member functions

2011-02-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47861 Paolo Carlini changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|

[Bug c++/47861] static variables inside member functions

2011-02-24 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47861 --- Comment #8 from Jonathan Wakely 2011-02-24 10:44:15 UTC --- (In reply to comment #7) > The issue is clearly caused by having > declared static the iterator. So that's a bug, don't do that. > Obviously the same snippet code can be > replac

[Bug c++/47861] static variables inside member functions

2011-02-24 Thread michal.t at tiscali dot it
ten in this way...a forced definition of the iterator being static would probably prevent some unprapred c++ users to make similar mistakes. Thank you all. Messaggio originale Da: gcc- bugzi...@gcc.gnu.org Data: 23/02/2011 22.28 A: Ogg: [Bug c++/47861] static variables inside mem

[Bug c++/47861] static variables inside member functions

2011-02-23 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47861 --- Comment #6 from Jonathan Wakely 2011-02-23 21:28:10 UTC --- (In reply to comment #5) > Also it is hard to produce a warning when it comes to a failure that will only > be diagnostic at link time. IIUC I think the OP wants a warning for: str

[Bug c++/47861] static variables inside member functions

2011-02-23 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47861 --- Comment #5 from Andrew Pinski 2011-02-23 21:19:56 UTC --- Also it is hard to produce a warning when it comes to a failure that will only be diagnostic at link time.

[Bug c++/47861] static variables inside member functions

2011-02-23 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47861 --- Comment #4 from Jonathan Wakely 2011-02-23 20:57:57 UTC --- As requested, please provide a code example showing what you mean, and explain what warning you would like to be issued.

[Bug c++/47861] static variables inside member functions

2011-02-23 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47861 --- Comment #3 from Jonathan Wakely 2011-02-23 20:55:08 UTC --- (In reply to comment #2) > Yep a warning stating the similarity of a static member function variable to > its counterpart as a static member would be appreciated...maybe when > pedan

[Bug c++/47861] static variables inside member functions

2011-02-23 Thread michal.tlk at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47861 --- Comment #2 from michal.tlk at gmail dot com 2011-02-23 20:45:23 UTC --- Yep a warning stating the similarity of a static member function variable to its counterpart as a static member would be appreciated...maybe when pedantic option is going t

[Bug c++/47861] static variables inside member functions

2011-02-23 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47861 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|