[Bug c++/17449] Cannot shut warning off
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Mon Sep 13 16:20:00 GMT 2004
------- Additional Comments From bangerth at dealii dot org 2004-09-13 16:20 -------
Err, the manual says:
@item -Wno-non-template-friend @r{(C++ only)}
@opindex Wno-non-template-friend
Disable warnings when non-templatized friend functions are declared
within a template. Since the advent of explicit template specification
support in G++, if the name of the friend is an unqualified-id (i.e.,
@samp{friend foo(int)}), the C++ language specification demands that the
friend declare or define an ordinary, nontemplate function. (Section
14.5.3). Before G++ implemented explicit specification, unqualified-ids
could be interpreted as a particular specialization of a templatized
function. Because this non-conforming behavior is no longer the default
behavior for G++, @option{-Wnon-template-friend} allows the compiler to
check existing code for potential trouble spots and is on by default.
This new compiler behavior can be turned off with
@option{-Wno-non-template-friend} which keeps the conformant compiler code
but disables the helpful warning.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17449
More information about the Gcc-bugs
mailing list