summaryrefslogtreecommitdiffstats
path: root/gcc/doc/extend.texi
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-25 10:52:31 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-25 10:52:31 +0000
commit2f215800416d889062e7764e5f01b3a8f199efb0 (patch)
tree0df8d2ae367eb2ac46fe9493f067c47d2c25b9c9 /gcc/doc/extend.texi
parent394bee60e90acca7ec74556b809179fb81ec61f2 (diff)
downloadppe42-gcc-2f215800416d889062e7764e5f01b3a8f199efb0.tar.gz
ppe42-gcc-2f215800416d889062e7764e5f01b3a8f199efb0.zip
* 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 ':'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69781 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r--gcc/doc/extend.texi11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 4bf39cac01f..0e76b6b08e1 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2268,8 +2268,7 @@ These attributes are not currently implemented for Objective-C@.
@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++.
+function.
@cindex @code{used} attribute.
@item used
@@ -2725,14 +2724,18 @@ with the list being a single string constant.
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
+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.
+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
OpenPOWER on IntegriCloud