invoke.texi (Warning Options): Add -Wnon-template-friend documentation.
� Thu Sep 3 18:17:34 1998 Benjamin Kosnik <bkoz@cygnus.com> * invoke.texi (Warning Options): Add -Wnon-template-friend documentation. g++/17054 From-SVN: r22216
This commit is contained in:
parent
a3a1dbf679
commit
d67343c9e1
@ -1,3 +1,8 @@
|
||||
Thu Sep 3 18:17:34 1998 Benjamin Kosnik <bkoz@cygnus.com>
|
||||
|
||||
* invoke.texi (Warning Options): Add -Wnon-template-friend
|
||||
documentation.
|
||||
|
||||
Thu Sep 3 18:16:16 1998 Michael Meissner <meissner@cygnus.com>
|
||||
|
||||
* rs6000.c (rs6000_override_options): Add -mcpu={401,e603e}.
|
||||
|
@ -124,11 +124,11 @@ in the following sections.
|
||||
-Wlarger-than-@var{len} -Wlong-long
|
||||
-Wmain -Wmissing-declarations
|
||||
-Wmissing-prototypes -Wmultichar -Wnested-externs -Wno-import
|
||||
-Wold-style-cast -Woverloaded-virtual -Wparentheses
|
||||
-Wpointer-arith -Wredundant-decls -Wreorder -Wreturn-type
|
||||
-Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch
|
||||
-Wsynth -Wtemplate-debugging -Wtraditional -Wtrigraphs
|
||||
-Wundef -Wuninitialized -Wunused -Wwrite-strings
|
||||
-Wno-non-template-friend -Wold-style-cast -Woverloaded-virtual
|
||||
-Wparentheses -Wpointer-arith -Wredundant-decls -Wreorder
|
||||
-Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototypes
|
||||
-Wswitch -Wsynth -Wtemplate-debugging -Wtraditional
|
||||
-Wtrigraphs -Wundef -Wuninitialized -Wunused -Wwrite-strings
|
||||
-Wunknown-pragmas
|
||||
@end smallexample
|
||||
|
||||
@ -1184,6 +1184,8 @@ have meanings only for C++ programs:
|
||||
Do not assume @samp{inline} for functions defined inside a class scope.
|
||||
@xref{Optimize Options,,Options That Control Optimization}.
|
||||
|
||||
@item -Wno-non-template-friend
|
||||
@xref{Warning Options,,Options to Request or Suppress Warnings}.
|
||||
@item -Wold-style-cast
|
||||
@itemx -Woverloaded-virtual
|
||||
@itemx -Wtemplate-debugging
|
||||
@ -1675,6 +1677,22 @@ cases where multiple declaration is valid and changes nothing.
|
||||
@item -Wnested-externs
|
||||
Warn if an @code{extern} declaration is encountered within an function.
|
||||
|
||||
@item -Wno-non-template-friend
|
||||
Disable warnings when non-templatized friend functions are declared
|
||||
within a template. With the advent of explicit template specification
|
||||
support in g++, if the name of the friend is an unqualified-id (ie,
|
||||
@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++, @samp{-Wnon-template-friend} allows the compiler to
|
||||
check existing code for potential trouble spots, and is on by default.
|
||||
This new compiler behavior can also be turned off with the flag
|
||||
@samp{-fguiding-decls}, which activates the older, non-specification
|
||||
compiler code, or with @samp{-Wno-non-template-friend} which keeps the
|
||||
conformant compiler code but disables the helpful warning.
|
||||
|
||||
@item -Winline
|
||||
Warn if a function can not be inlined, and either it was declared as inline,
|
||||
or else the @samp{-finline-functions} option was given.
|
||||
|
Loading…
Reference in New Issue
Block a user