This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/47347] "pragma GCC diagnostic ignored" has no effect sometimes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]