public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/55557] New: g++ 4.7 does not issue a warning on the first auto_ptr @ 2012-12-01 20:43 pashev.igor at gmail dot com 2012-12-01 20:46 ` [Bug c++/55557] " pashev.igor at gmail dot com ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: pashev.igor at gmail dot com @ 2012-12-01 20:43 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55557 Bug #: 55557 Summary: g++ 4.7 does not issue a warning on the first auto_ptr Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: pashev.igor@gmail.com Here is a C++ source code: # cat -n test.cpp 1 #include <memory> 2 using namespace std; 3 4 int main(int argc, char **argv) 5 { 6 auto_ptr<int> x; 7 auto_ptr<int> y; 8 auto_ptr<int> z; 9 10 return 0; 11 } Command line to compile it with C++11 standard: g++-4.7 -std=gnu++11 -Wall -Wextra -Wdeprecated-declarations -pedantic test.cpp Here is the g++ output: test.cpp: In function ‘int main(int, char**)’: test.cpp:7:19: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.7/backward/auto_ptr.h:87) [-Wdeprecated-declarations] test.cpp:8:19: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.7/backward/auto_ptr.h:87) [-Wdeprecated-declarations] test.cpp: At global scope: test.cpp:4:5: warning: unused parameter ‘argc’ [-Wunused-parameter] test.cpp:4:5: warning: unused parameter ‘argv’ [-Wunused-parameter] A warning about auto_ptr being deprecated has been issued only for y and z. I expect a warning for x too. Moreover, if I leave only one auto_ptr (say, x) I will see no deprecation warning at all. It is expected to see warning on every auto_ptr instantiation. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/55557] g++ 4.7 does not issue a warning on the first auto_ptr 2012-12-01 20:43 [Bug c++/55557] New: g++ 4.7 does not issue a warning on the first auto_ptr pashev.igor at gmail dot com @ 2012-12-01 20:46 ` pashev.igor at gmail dot com 2012-12-01 22:01 ` [Bug c++/55557] no deprecated warning on the first std::auto_ptr paolo.carlini at oracle dot com 2012-12-01 22:12 ` paolo.carlini at oracle dot com 2 siblings, 0 replies; 4+ messages in thread From: pashev.igor at gmail dot com @ 2012-12-01 20:46 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55557 --- Comment #1 from Igor Pashev <pashev.igor at gmail dot com> 2012-12-01 20:46:12 UTC --- # g++-4.7 --version g++-4.7 (Debian 4.7.2-4) 4.7.2 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/55557] no deprecated warning on the first std::auto_ptr 2012-12-01 20:43 [Bug c++/55557] New: g++ 4.7 does not issue a warning on the first auto_ptr pashev.igor at gmail dot com 2012-12-01 20:46 ` [Bug c++/55557] " pashev.igor at gmail dot com @ 2012-12-01 22:01 ` paolo.carlini at oracle dot com 2012-12-01 22:12 ` paolo.carlini at oracle dot com 2 siblings, 0 replies; 4+ messages in thread From: paolo.carlini at oracle dot com @ 2012-12-01 22:01 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55557 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-12-01 Summary|g++ 4.7 does not issue a |no deprecated warning on |warning on the first |the first std::auto_ptr |auto_ptr | Ever Confirmed|0 |1 --- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-12-01 22:01:35 UTC --- Weird, doesn't seem a regression though. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/55557] no deprecated warning on the first std::auto_ptr 2012-12-01 20:43 [Bug c++/55557] New: g++ 4.7 does not issue a warning on the first auto_ptr pashev.igor at gmail dot com 2012-12-01 20:46 ` [Bug c++/55557] " pashev.igor at gmail dot com 2012-12-01 22:01 ` [Bug c++/55557] no deprecated warning on the first std::auto_ptr paolo.carlini at oracle dot com @ 2012-12-01 22:12 ` paolo.carlini at oracle dot com 2 siblings, 0 replies; 4+ messages in thread From: paolo.carlini at oracle dot com @ 2012-12-01 22:12 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55557 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-12-01 22:12:13 UTC --- Well, this is the old PR33911: only, in that one Benjamin didn't notice that an additional: goo<int> f2b; finally gets the working. *** This bug has been marked as a duplicate of bug 33911 *** ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-01 22:12 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-12-01 20:43 [Bug c++/55557] New: g++ 4.7 does not issue a warning on the first auto_ptr pashev.igor at gmail dot com 2012-12-01 20:46 ` [Bug c++/55557] " pashev.igor at gmail dot com 2012-12-01 22:01 ` [Bug c++/55557] no deprecated warning on the first std::auto_ptr paolo.carlini at oracle dot com 2012-12-01 22:12 ` paolo.carlini at oracle dot com
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).