diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-07 23:01:23 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-07 23:01:23 +0000 |
commit | 541e41014f4f079620c9d2a35ea833c67d94d610 (patch) | |
tree | ef34d7e6f5808177003e88ab3eb698579a33ddb9 /gcc/doc | |
parent | 09969f33c725480f635810e241881b5ece42091a (diff) | |
download | gcc-541e41014f4f079620c9d2a35ea833c67d94d610.tar.gz |
* c-common.c (c_common_attributes): Add gnu_inline attribyte.
(handle_gnu_inline_attribute): New function.
* c-decl.c (diagnose_mismatched_decls): Handle gnu_inline attribute.
(merge_decls, start_decl, start_function): Likewise.
* doc/extend.texi: Document gnu_inline attribute.
* gcc.dg/inline-17.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118567 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/extend.texi | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 9ec4460bb6a..1579b94a970 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -1581,8 +1581,8 @@ attributes are currently defined for functions on all targets: @code{format}, @code{format_arg}, @code{no_instrument_function}, @code{section}, @code{constructor}, @code{destructor}, @code{used}, @code{unused}, @code{deprecated}, @code{weak}, @code{malloc}, -@code{alias}, @code{warn_unused_result}, @code{nonnull} -and @code{externally_visible}. Several other +@code{alias}, @code{warn_unused_result}, @code{nonnull}, +@code{gnu_inline} and @code{externally_visible}. Several other attributes are defined for functions on particular target systems. Other attributes, including @code{section} are supported for variables declarations (@pxref{Variable Attributes}) and for types (@pxref{Type Attributes}). @@ -1620,6 +1620,11 @@ Generally, functions are not inlined unless optimization is specified. For functions declared inline, this attribute inlines the function even if no optimization level was specified. +@item gnu_inline +@cindex @code{gnu_inline} function attribute +This attribute on an inline declaration results in the old GNU C89 +inline behavior even in the ISO C99 mode. + @cindex @code{flatten} function attribute @item flatten Generally, inlining into a function is limited. For a function marked with @@ -3802,7 +3807,8 @@ also direct GCC to try to integrate all ``simple enough'' functions into their callers with the option @option{-finline-functions}. GCC implements three different semantics of declaring a function -inline. One is available with @option{-std=gnu89}, another when +inline. One is available with @option{-std=gnu89} or when @code{gnu_inline} +attribute is present on all inline declarations, another when @option{-std=c99} or @option{-std=gnu99}, and the third is used when compiling C++. |