This is the mail archive of the gcc-patches@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]

-Weffc++ documentation update



I was curious about exactly which style guidelines -Weffc++ warned
about, but the documentation just said "various".  This patch updates
the documentation to explicitly list which guidelines are checked, to
save someone else the (small) trouble of grepping for "Effective C++" in
the code.


2002-02-18  Ryan T. Sammartino <ryants@shaw.ca>

	* doc/invoke.texi: explicitly list the style guidelines that
	-Weffc++ checks for.


Index: gcc/doc/invoke.texi
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.114
diff -c -3 -p -b -r1.114 invoke.texi
*** gcc/doc/invoke.texi	9 Feb 2002 03:08:07 -0000	1.114
--- gcc/doc/invoke.texi	19 Feb 2002 06:10:38 -0000
*************** The following @option{-W@dots{}} options
*** 1575,1584 ****
  @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.
  
  @item -Wno-deprecated @r{(C++ only)}
  @opindex Wno-deprecated
--- 1575,1618 ----
  @table @gcctabopt
  @item -Weffc++ @r{(C++ only)}
  @opindex Weffc++
! 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

-- 
Ryan T. Sammartino
http://members.shaw.ca/ryants/
Real Programmers think better when playing Adventure or Rogue.


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