diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-24 19:18:43 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-24 19:18:43 +0000 |
commit | 334ec92614b1000492c60b01f9c827dd33c32627 (patch) | |
tree | be46d82b47945fa6f5b787b66f752af4d7711a6b /gcc/cp/cp-tree.h | |
parent | 5b669c7be524c79d76fbaa2e8f4bd2dae9268570 (diff) | |
download | gcc-334ec92614b1000492c60b01f9c827dd33c32627.tar.gz |
* cp-tree.h (SCALAR_TYPE_P): New macro.
(check_for_out_of_scope_variable): New function.
(at_class_scope_p): Likewise.
(finish_fname): Likewise.
* class.c (finish_struct): Use at_function_scope_p.
* decl.c (check_for_out_of_scope_variable): New function, split
out from do_identifier.
(finish_enum): Use at_function_scope_p.
* lex.c (do_identifier): Use check_for_out_of_scope_variable.
* parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
(primary): Use at_function_scope_p.
* search.c (at_class_scope_p): New function.
* semantics.c (finish_fname): Likewise.
(check_multiple_declarators): Use at_function_scope_p.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54962 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 6b39adade38..32b24126711 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -2546,6 +2546,17 @@ extern int flag_new_for_scope; #define ARITHMETIC_TYPE_P(TYPE) \ (CP_INTEGRAL_TYPE_P (TYPE) || TREE_CODE (TYPE) == REAL_TYPE) +/* [basic.types] + + Arithmetic types, enumeration types, pointer types, and + pointer-to-member types, are collectively called scalar types. */ +#define SCALAR_TYPE_P(TYPE) \ + (ARITHMETIC_TYPE_P (TYPE) \ + || TREE_CODE (TYPE) == ENUMERAL_TYPE \ + || TYPE_PTR_P (TYPE) \ + || TYPE_PTRMEM_P (TYPE) \ + || TYPE_PTRMEMFUNC_P (TYPE)) + /* Nonzero for _TYPE means that the _TYPE defines at least one constructor. */ #define TYPE_HAS_CONSTRUCTOR(NODE) (TYPE_LANG_FLAG_1 (NODE)) @@ -3812,6 +3823,7 @@ extern void begin_only_namespace_names PARAMS ((void)); extern void end_only_namespace_names PARAMS ((void)); extern tree namespace_ancestor PARAMS ((tree, tree)); extern tree unqualified_namespace_lookup PARAMS ((tree, int, tree *)); +extern tree check_for_out_of_scope_variable (tree); extern int lookup_using_namespace PARAMS ((tree, tree, tree, tree, int, tree *)); extern int qualified_lookup_using_namespace PARAMS ((tree, tree, tree, int)); extern tree build_library_fn PARAMS ((tree, tree)); @@ -4174,6 +4186,7 @@ extern void init_search_processing PARAMS ((void)); extern void reinit_search_statistics PARAMS ((void)); extern tree current_scope PARAMS ((void)); extern int at_function_scope_p PARAMS ((void)); +extern bool at_class_scope_p (void); extern tree context_for_name_lookup PARAMS ((tree)); extern tree lookup_conversions PARAMS ((tree)); extern tree binfo_for_vtable PARAMS ((tree)); @@ -4261,6 +4274,7 @@ extern tree finish_pseudo_destructor_call_expr PARAMS ((tree, tree, tree)); extern tree finish_qualified_call_expr PARAMS ((tree, tree)); extern tree finish_unary_op_expr PARAMS ((enum tree_code, tree)); extern tree finish_id_expr PARAMS ((tree)); +extern tree finish_fname (tree); extern void save_type_access_control PARAMS ((tree)); extern void reset_type_access_control PARAMS ((void)); extern void decl_type_access_control PARAMS ((tree)); |