]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c/c-typeck.c
re PR c/39556 (statics in C99 inline functions later declared extern)
authorJoseph Myers <joseph@codesourcery.com>
Sun, 26 Apr 2009 13:40:19 +0000 (14:40 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Sun, 26 Apr 2009 13:40:19 +0000 (14:40 +0100)
commit991d66210228392118aa3f8102cb49a9f9c2b168
treeec728d126f99eee23b10a037545ce496f4aeb946
parent4a81774c7b071cccb707cd31a7906b01c876944e
re PR c/39556 (statics in C99 inline functions later declared extern)

PR c/39556
* c-tree.h (enum c_inline_static_type): New.
(record_inline_static): Declare.
* c-decl.c (struct c_inline_static, c_inline_statics,
record_inline_static, check_inline_statics): New.
(pop_file_scope): Call check_inline_statics.
(start_decl): Call record_inline_static instead of pedwarning
directly for static in inline function.
* c-typeck.c (build_external_ref): Call record_inline_static
instead of pedwarning directly for static referenced in inline
function.

testsuite:
* gcc.dg/inline-34.c: New test.

From-SVN: r146800
gcc/ChangeLog
gcc/c-decl.c
gcc/c-tree.h
gcc/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/inline-34.c [new file with mode: 0644]