This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47347] "pragma GCC diagnostic ignored" has no effect sometimes
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Jan 2011 17:32:40 +0000
- Subject: [Bug c++/47347] "pragma GCC diagnostic ignored" has no effect sometimes
- Auto-submitted: auto-generated
- References: <bug-47347-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47347
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-01-18 17:32:39 UTC ---
reduced:
#pragma GCC diagnostic ignored "-Wunused-parameter"
template <class>
struct KeyValue
{
virtual void serialize(int a) const
{
}
};
void f()
{
KeyValue<int> values;
}
#pragma GCC diagnostic warning "-Wunused-parameter"
The template instantiation is at the end of the file, after the warning has
been re-enabled.
There's no warning with 4.6.0