This is the mail archive of the gcc@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]

(Getting rid of) warning about guiding-decls


Compiling the following snippet

  template <class T>
  class NAMESTABLE
      {
      friend operator+ (int, T);
      };

with egcs-current-CVS results in

  y.cc:4: warning: friend declaration `int operator +(int, T)'
  y.cc:4: warning:   declares a non-template function
  y.cc:4: warning:   unless you compile with -fguiding-decls
  y.cc:4: warning:   or add <> after the function name


Actually, declaring a non-template function is exactly what I want
here, so how can I get rid of that warning?


Should this warning _really_ be active by default, especially when no
-W option (-Wall) has been specified? 

How about adding some option to inhibit this warning? -Wno-guiding-decls?

Gerald
-- 
Gerald Pfeifer (Jerry)      Vienna University of Technology
pfeifer@dbai.tuwien.ac.at   http://www.dbai.tuwien.ac.at/~pfeifer/



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