summaryrefslogtreecommitdiff
path: root/gcc/c-common.h
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2001-07-13 21:40:43 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2001-07-13 21:40:43 +0100
commit59387d2e310983bced3bf86cb759a1dbc1520277 (patch)
tree7344925821f5f63d7da1217406a45dd134918cfd /gcc/c-common.h
parente47c5acd7b2c5dcaf4ece03897e9baa12e867cf9 (diff)
downloadgcc-59387d2e310983bced3bf86cb759a1dbc1520277.tar.gz
c-common.c (decl_attributes): Take a pointer to the node to which attributes are to be attached...
* c-common.c (decl_attributes): Take a pointer to the node to which attributes are to be attached, and a flags argument. * c-common.h (enum attribute_flags): New. (decl_attributes): Update prototype. * c-decl.c (start_decl, push_parm_decl, finish_struct, finish_enum, start_function): Update calls to decl_attributes. * c-parse.in (component_declarator, component_notype_declarator, label): Update calls to decl_attributes. cp: * decl2.c (cplus_decl_attributes): Take a pointer to the node to which attributes are to be attached, and a flags argument. Update call to decl_attributes. (grokfield): Update call to decl_attributes. * class.c (finish_struct): Update call to cplus_decl_attributes. * cp-tree.h (cplus_decl_attributes): Update prototype. * decl.c (start_decl, grokdeclarator, start_function): Update calls to decl_attributes and cplus_decl_attributes. * friend.c (do_friend): Update call to cplus_decl_attributes. * parse.y (parse_bitfield): Update call to cplus_decl_attributes. From-SVN: r43995
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r--gcc/c-common.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h
index eac227e48d2..0ba64b121d1 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -498,7 +498,25 @@ extern void finish_fname_decls PARAMS ((void));
extern const char *fname_as_string PARAMS ((int));
extern tree fname_decl PARAMS ((unsigned, tree));
extern const char *fname_string PARAMS ((unsigned));
-extern void decl_attributes PARAMS ((tree, tree));
+
+/* Flags that may be passed in the third argument of decl_attributes. */
+enum attribute_flags
+{
+ /* The type passed in is the type of a DECL, and any attributes that
+ should be passed in again to be applied to the DECL rather than the
+ type should be returned. */
+ ATTR_FLAG_DECL_NEXT = 1,
+ /* The type passed in is a function return type, and any attributes that
+ should be passed in again to be applied to the function type rather
+ than the return type should be returned. */
+ ATTR_FLAG_FUNCTION_NEXT = 2,
+ /* The type passed in is an array element type, and any attributes that
+ should be passed in again to be applied to the array type rather
+ than the element type should be returned. */
+ ATTR_FLAG_ARRAY_NEXT = 4
+};
+
+extern tree decl_attributes PARAMS ((tree *, tree, int));
extern void init_function_format_info PARAMS ((void));
extern void check_function_format PARAMS ((int *, tree, tree, tree));
extern void set_Wformat PARAMS ((int));