invoke.texi: explicitly list the style guidelines that -Weffc++ checks for.
authorRyan T. Sammartino <ryants@shaw.ca>
Tue, 19 Feb 2002 14:05:53 +0000 (09:05 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 19 Feb 2002 14:05:53 +0000 (09:05 -0500)
        * doc/invoke.texi: explicitly list the style guidelines that
        -Weffc++ checks for.

From-SVN: r49866

gcc/ChangeLog
gcc/doc/invoke.texi

index b6f6a1c1de0d1ed7be2bcb775723cb536dfe43f9..9de70ed374e52455ae5231eea19c4202ebc560f9 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-19  Ryan T. Sammartino <ryants@shaw.ca>
+
+       * doc/invoke.texi: explicitly list the style guidelines that
+       -Weffc++ checks for.
+
 Tue Feb 19 12:37:23 CET 2002  Jan Hubicka  <jh@suse.cz>
 
        * regmove.c (regmove_optimize): Avoid increasing of register pressure.
@@ -660,17 +665,17 @@ Tue Feb 12 10:12:56 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
 2002-02-11  Aldy Hernandez  <aldyh@redhat.com>
 
-        * config/rs6000/rs6000.c (altivec_init_builtins): Handle
-        __builtin_altivec_abs*.
-        (bdesc_abs): New.
+       * config/rs6000/rs6000.c (altivec_init_builtins): Handle
+       __builtin_altivec_abs*.
+       (bdesc_abs): New.
 
-        * config/rs6000/rs6000.h (rs6000_builtins): Add
-        ALTIVEC_BUILTIN_ABS*.
+       * config/rs6000/rs6000.h (rs6000_builtins): Add
+       ALTIVEC_BUILTIN_ABS*.
 
-        * config/rs6000/altivec.h: Use const char for builtins expecting
-        literals.
-        (vec_abs): New versions for C and C++.
-        (vec_abss): Same.
+       * config/rs6000/altivec.h: Use const char for builtins expecting
+       literals.
+       (vec_abs): New versions for C and C++.
+       (vec_abss): Same.
 
 2002-02-10  Kazu Hirata  <kazu@hxi.com>
 
@@ -1937,20 +1942,6 @@ Thu Feb  7 12:14:17 CET 2002  Jan Hubicka  <jh@suse.cz>
 
 2002-02-05  Jason Merrill  <jason@redhat.com>
 
-       * c-typeck.c (convert_for_assignment): Don't allow conversions
-       between pointers and references.  Only allow lvalues to convert to
-       reference.
-
-       * c-decl.c (finish_function): Warn about a non-void function with
-       no return statement and no abnormal exit.
-       (current_function_returns_abnormally): New variable.
-       (start_function): Clear it.
-       (struct c_language_function): Add returns_abnormally.
-       (push_c_function_context): Save it.
-       (pop_c_function_context): Restore it.
-       * c-tree.h: Declare current_function_returns_abnormally.
-       * c-typeck.c (build_function_call): Set it.
-
        * collect2.c (dump_file): Pass DMGL_VERBOSE to cplus_demangle.
 
 2002-02-05  Andreas Jaeger  <aj@suse.de>
index 620edb735c976c19f5d9724ae84b5aa59e2c7685..10d9521ec96549e8969420b83179415286867fd1 100644 (file)
@@ -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