[Bug c++/43272] -Wmissing-prototypes doesn't work in C++ mode

2010-03-15 Thread erh+gcc at nimenees dot com
--- Comment #13 from erh+gcc at nimenees dot com 2010-03-15 17:30 --- (In reply to comment #12) > (In reply to comment #11) > > hmm... is there a way to have g++ put everything into some default > > namespace so > > I always get errors like this? If so, that w

[Bug c++/43272] -Wmissing-prototypes doesn't work in C++ mode

2010-03-08 Thread erh+gcc at nimenees dot com
--- Comment #11 from erh+gcc at nimenees dot com 2010-03-08 16:36 --- (In reply to comment #6) > You don't need a new warning to get what you want, as long as you put your > functions in a namespace: > ...snip... > error: 'void ns::myfunc(const char*)' shoul

[Bug c++/43272] -Wmissing-prototypes doesn't work in C++ mode

2010-03-08 Thread erh+gcc at nimenees dot com
--- Comment #10 from erh+gcc at nimenees dot com 2010-03-08 16:35 --- (In reply to comment #8) > > The code that calls the function also *compiles* cleanly, and only the link > > fails. > > No, the code calling it does not compile cleanly if there's no previous &

[Bug c++/43272] -Wmissing-prototypes doesn't work in C++ mode

2010-03-08 Thread erh+gcc at nimenees dot com
--- Comment #7 from erh+gcc at nimenees dot com 2010-03-08 16:07 --- (In reply to comment #5) > What I'm saying is that this entire discussion is already present in PR13687 > and that there is nothing more to say. The warning exists in C because it > can lead to hard-to-

[Bug c++/43272] -Wmissing-prototypes doesn't work in C++ mode

2010-03-07 Thread erh+gcc at nimenees dot com
--- Comment #4 from erh+gcc at nimenees dot com 2010-03-08 04:02 --- (In reply to comment #3) > (In reply to comment #2) > > So does this mean bug #13687 is going to be reopened? Or is there some > > workaround that hasn't been mentioned? > > No. I think th

[Bug c++/43272] -Wmissing-prototypes doesn't work in C++ mode

2010-03-06 Thread erh+gcc at nimenees dot com
--- Comment #2 from erh+gcc at nimenees dot com 2010-03-06 21:34 --- So does this mean bug #13687 is going to be reopened? Or is there some workaround that hasn't been mentioned? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43272

[Bug c++/43272] New: -Wmissing-prototypes doesn't work in C++ mode

2010-03-05 Thread erh+gcc at nimenees dot com
(Same behaviour exists on gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) When compiling a c++ program it would be very useful to get warnings about missing prototypes. This works in C mode, but not in c++ mode. Example: cat > foo.cpp