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]

[doc patch] Fix PR c++/11613


Hi,
I've installed this patch to fix PR 11613 (by documenting it :).
I also noticed that C++ does now accept unused on a function
parameter - yay!


nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC The voices in my head said this was stupid too nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk

2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>

	* doc/extend.texi (Function Attributes): GNU C++ does now allow
	unused parameter decls.
	(Attribute Syntax): GNU C++ does not allow label attributes to be
	after the ':'.

Index: doc/extend.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/extend.texi,v
retrieving revision 1.150
diff -c -3 -p -r1.150 extend.texi
*** doc/extend.texi	21 Jul 2003 15:08:55 -0000	1.150
--- doc/extend.texi	25 Jul 2003 10:41:34 -0000
*************** These attributes are not currently imple
*** 2268,2275 ****
  @item unused
  This attribute, attached to a function, means that the function is meant
  to be possibly unused.  GCC will not produce a warning for this
! function.  GNU C++ does not currently support this attribute as
! definitions without parameters are valid in C++.
  
  @cindex @code{used} attribute.
  @item used
--- 2268,2274 ----
  @item unused
  This attribute, attached to a function, means that the function is meant
  to be possibly unused.  GCC will not produce a warning for this
! function.
  
  @cindex @code{used} attribute.
  @item used
*************** with the list being a single string cons
*** 2725,2738 ****
  An @dfn{attribute specifier list} is a sequence of one or more attribute
  specifiers, not separated by any other tokens.
  
! An attribute specifier list may appear after the colon following a
  label, other than a @code{case} or @code{default} label.  The only
  attribute it makes sense to use after a label is @code{unused}.  This
  feature is intended for code generated by programs which contains labels
  that may be unused but which is compiled with @option{-Wall}.  It would
  not normally be appropriate to use in it human-written code, though it
  could be useful in cases where the code that jumps to the label is
! contained within an @code{#ifdef} conditional.
  
  An attribute specifier list may appear as part of a @code{struct},
  @code{union} or @code{enum} specifier.  It may go either immediately
--- 2724,2741 ----
  An @dfn{attribute specifier list} is a sequence of one or more attribute
  specifiers, not separated by any other tokens.
  
! In GNU C, an attribute specifier list may appear after the colon following a
  label, other than a @code{case} or @code{default} label.  The only
  attribute it makes sense to use after a label is @code{unused}.  This
  feature is intended for code generated by programs which contains labels
  that may be unused but which is compiled with @option{-Wall}.  It would
  not normally be appropriate to use in it human-written code, though it
  could be useful in cases where the code that jumps to the label is
! contained within an @code{#ifdef} conditional. GNU C++ does not permit
! such placement of attribute lists, as it is permissible for a
! declaration, which could begin with an attribute list, to be labelled in
! C++. Declarations cannot be labelled in C90 or C99, so the ambiguity
! does not arise there.
  
  An attribute specifier list may appear as part of a @code{struct},
  @code{union} or @code{enum} specifier.  It may go either immediately

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