This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
(Getting rid of) warning about guiding-decls
- To: egcs at cygnus dot com
- Subject: (Getting rid of) warning about guiding-decls
- From: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- Date: Thu, 5 Mar 1998 20:44:04 +0100 (MET)
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/