From 77f6c1eb3a281809781471ad479cc3ab6e70a1f5 Mon Sep 17 00:00:00 2001 From: "Ryan T. Sammartino" Date: Tue, 19 Feb 2002 09:05:53 -0500 Subject: [PATCH] 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 --- gcc/ChangeLog | 37 ++++++++++++++----------------------- gcc/doc/invoke.texi | 42 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 52 insertions(+), 27 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b6f6a1c1de0..9de70ed374e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-02-19 Ryan T. Sammartino + + * doc/invoke.texi: explicitly list the style guidelines that + -Weffc++ checks for. + Tue Feb 19 12:37:23 CET 2002 Jan Hubicka * regmove.c (regmove_optimize): Avoid increasing of register pressure. @@ -660,17 +665,17 @@ Tue Feb 12 10:12:56 2002 Richard Kenner 2002-02-11 Aldy Hernandez - * 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 @@ -1937,20 +1942,6 @@ Thu Feb 7 12:14:17 CET 2002 Jan Hubicka 2002-02-05 Jason Merrill - * 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 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 620edb735c9..10d9521ec96 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 -- 2.30.2