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++/17449] Cannot shut warning off


------- 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


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