diff options
author | Ryan T. Sammartino <ryants@shaw.ca> | 2002-02-19 09:05:53 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2002-02-19 09:05:53 -0500 |
commit | 77f6c1eb3a281809781471ad479cc3ab6e70a1f5 (patch) | |
tree | d6a0483f08380397789e6ed6093b04c92c3f48c9 /gcc/doc/invoke.texi | |
parent | fd973d5630bb29a2a0a90aa325b26395b8882320 (diff) | |
download | gcc-77f6c1eb3a281809781471ad479cc3ab6e70a1f5.zip gcc-77f6c1eb3a281809781471ad479cc3ab6e70a1f5.tar.gz gcc-77f6c1eb3a281809781471ad479cc3ab6e70a1f5.tar.bz2 |
invoke.texi: explicitly list the style guidelines that -Weffc++ checks for.
* doc/invoke.texi: explicitly list the style guidelines that
-Weffc++ checks for.
From-SVN: r49866
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r-- | gcc/doc/invoke.texi | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 620edb7..10d9521 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1575,10 +1575,44 @@ The following @option{-W@dots{}} options are not affected by @option{-Wall}. @table @gcctabopt @item -Weffc++ @r{(C++ only)} @opindex Weffc++ -Warn about violations of various style guidelines from Scott Meyers' -@cite{Effective C++} books. If you use this option, you should be aware -that the standard library headers do not obey all of these guidelines; -you can use @samp{grep -v} to filter out those warnings. +Warn about violations of the following style guidelines from Scott Meyers' +@cite{Effective C++} book: + +@itemize @bullet +@item +Item 11: Define a copy constructor and an assignment operator for classes +with dynamically allocated memory. + +@item +Item 12: Prefer initialization to assignment in constructors. + +@item +Item 14: Make destructors virtual in base classes. + +@item +Item 15: Have @code{operator=} return a reference to @code{*this}. + +@item +Item 23: Don't try to return a reference when you must return an object. + +@end itemize + +and about violations of the following style guidelines from Scott Meyers' +@cite{More Effective C++} book: + +@itemize @bullet +@item +Item 6: Distinguish between prefix and postfix forms of increment and +decrement operators. + +@item +Item 7: Never overload @code{&&}, @code{||}, or @code{,}. + +@end itemize + +If you use this option, you should be aware that the standard library +headers do not obey all of these guidelines; you can use @samp{grep -v} +to filter out those warnings. @item -Wno-deprecated @r{(C++ only)} @opindex Wno-deprecated |