summaryrefslogtreecommitdiff
path: root/gcc/c-tree.h
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-26 13:40:19 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-26 13:40:19 +0000
commit551ed71acf2df41550eab28d484fbcc7fca8d5c6 (patch)
treeec728d126f99eee23b10a037545ce496f4aeb946 /gcc/c-tree.h
parent2e81afe57232d323f4fb4c44c4b81863fbc77f19 (diff)
downloadgcc-551ed71acf2df41550eab28d484fbcc7fca8d5c6.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146800 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-tree.h')
-rw-r--r--gcc/c-tree.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index 64e491e1e33..0bfcdfe387a 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -467,6 +467,18 @@ struct c_enum_contents
int enum_overflow;
};
+/* A type of reference to a static identifier in an inline
+ function. */
+enum c_inline_static_type {
+ /* Identifier with internal linkage used in function that may be an
+ inline definition (i.e., file-scope static). */
+ csi_internal,
+ /* Modifiable object with static storage duration defined in
+ function that may be an inline definition (i.e., local
+ static). */
+ csi_modifiable
+};
+
/* in c-parser.c */
extern void c_parse_init (void);
@@ -483,6 +495,8 @@ extern int global_bindings_p (void);
extern void push_scope (void);
extern tree pop_scope (void);
+extern void record_inline_static (location_t, tree, tree,
+ enum c_inline_static_type);
extern void c_init_decl_processing (void);
extern void c_dup_lang_specific_decl (tree);
extern void c_print_identifier (FILE *, tree, int);