* c-decl.c (grokdeclarator): Don't set DECL_EXTERNAL on
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Nov 2006 04:47:30 +0000 (04:47 +0000)
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Nov 2006 04:47:30 +0000 (04:47 +0000)
commitc42cc79ee514555fad2c8bad93f814600c971e72
treecf167878872183d2722b5e3979810401a81da5d0
parentcd29ee4b5a1b281f08bdbf32878efed5285aca6d
* c-decl.c (grokdeclarator): Don't set DECL_EXTERNAL on
inline static functions in c99 mode.

PR 16622
* doc/extend.texi (Inline): Update.
* c-tree.h (struct language_function): Remove field 'extern_inline'.
* c-decl.c (current_extern_inline): Delete.
(pop_scope): Adjust test for an undefined nested function.
Add warning about undeclared inline function.
(diagnose_mismatched_decls): Update comments.  Disallow overriding
of inline functions in a translation unit in C99.  Allow inline
declarations in C99 at any time.
(merge_decls): Boolize variables.  Handle C99 'extern inline'
semantics.
(grokdeclarator): Set DECL_EXTERNAL here for functions.  Handle
C99 inline semantics.
(start_function): Don't clear current_extern_inline.  Don't set
DECL_EXTERNAL.
(c_push_function_context): Don't push current_extern_inline.
(c_pop_function_context): Don't restore current_extern_inline.

PR 11377
* c-typeck.c (build_external_ref): Warn about static variables
used in extern inline functions.
* c-decl.c (start_decl): Warn about static variables declared
in extern inline functions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118356 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/ChangeLog
gcc/c-decl.c
gcc/c-tree.h
gcc/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/inline-10.c
gcc/testsuite/gcc.dg/inline-13.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/inline-14.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/inline-15.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/inline-16.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/inline6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/inline7.c [new file with mode: 0644]