summaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-02 21:47:37 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-02 21:47:37 +0000
commit6170dfb6edfb7b19f8ae5209b8f948fe0076a4ad (patch)
tree76b362fb924ab4ffb8a4b4610503ff684275f92b /gcc/cp/cp-tree.h
parentd11ae286bcc45264b87629485358d5642ab9301e (diff)
downloadgcc-6170dfb6edfb7b19f8ae5209b8f948fe0076a4ad.tar.gz
Merge trunk at revision 160193 into branch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/vect256@160194 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h42
1 files changed, 23 insertions, 19 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 3b8e9d05584..da8293f7b52 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -26,10 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "ggc.h"
#include "function.h"
#include "hashtab.h"
-#include "splay-tree.h"
#include "vec.h"
-#include "c-common.h"
-#include "name-lookup.h"
/* In order for the format checking to accept the C++ front end
diagnostic framework extensions, you must include this file before
@@ -37,18 +34,17 @@ along with GCC; see the file COPYING3. If not see
in c-common.h. */
#undef GCC_DIAG_STYLE
#define GCC_DIAG_STYLE __gcc_cxxdiag__
-#if GCC_VERSION >= 4001
-#define ATTRIBUTE_GCC_CXXDIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m, n))) ATTRIBUTE_NONNULL(m)
-#else
-#define ATTRIBUTE_GCC_CXXDIAG(m, n) ATTRIBUTE_NONNULL(m)
-#endif
-#ifdef GCC_TOPLEV_H
+#if defined(GCC_TOPLEV_H) || defined (GCC_C_COMMON_H)
#error \
In order for the format checking to accept the C++ front end diagnostic \
-framework extensions, you must include this file before toplev.h, not after.
+framework extensions, you must include this file before toplev.h and \
+c-common.h, not after.
#endif
#include "toplev.h"
#include "diagnostic.h"
+#include "c-common.h"
+
+#include "name-lookup.h"
/* Usage of TREE_LANG_FLAG_?:
0: IDENTIFIER_MARKED (IDENTIFIER_NODEs)
@@ -244,9 +240,6 @@ typedef struct template_parm_index_s template_parm_index;
struct GTY(()) ptrmem_cst {
struct tree_common common;
- /* This isn't used, but the middle-end expects all constants to have
- this field. */
- rtx rtl;
tree member;
};
typedef struct ptrmem_cst * ptrmem_cst_t;
@@ -1741,6 +1734,12 @@ struct GTY(()) lang_type {
(TYPE_RAISES_EXCEPTIONS (NODE) \
&& TREE_VALUE (TYPE_RAISES_EXCEPTIONS (NODE)) == NULL_TREE)
+/* For FUNCTION_TYPE or METHOD_TYPE, true if NODE is noexcept. This is the
+ case for things declared noexcept(true) and, with -fnothrow-opt, for
+ throw() functions. */
+#define TYPE_NOEXCEPT_P(NODE) \
+ (flag_nothrow_opt && TYPE_NOTHROW_P(NODE))
+
/* The binding level associated with the namespace. */
#define NAMESPACE_LEVEL(NODE) \
(LANG_DECL_NS_CHECK (NODE)->level)
@@ -4369,14 +4368,14 @@ typedef enum cp_decl_spec {
typedef struct cp_decl_specifier_seq {
/* The number of times each of the keywords has been seen. */
unsigned specs[(int) ds_last];
+ /* The location of the primary type. Mainly used for error
+ reporting. */
+ location_t type_location;
/* The primary type, if any, given by the decl-specifier-seq.
Modifiers, like "short", "const", and "unsigned" are not
reflected here. This field will be a TYPE, unless a typedef-name
was used, in which case it will be a TYPE_DECL. */
tree type;
- /* The location of the primary type. Mainly used for error
- reporting. */
- location_t type_location;
/* The attributes, if any, provided with the specifier sequence. */
tree attributes;
/* If non-NULL, a built-in type that the user attempted to redefine
@@ -4400,6 +4399,8 @@ typedef struct cp_decl_specifier_seq {
BOOL_BITFIELD any_type_specifiers_p : 1;
/* True iff "int" was explicitly provided. */
BOOL_BITFIELD explicit_int_p : 1;
+ /* True iff "__int128" was explicitly provided. */
+ BOOL_BITFIELD explicit_int128_p : 1;
/* True iff "char" was explicitly provided. */
BOOL_BITFIELD explicit_char_p : 1;
} cp_decl_specifier_seq;
@@ -4444,12 +4445,12 @@ struct cp_declarator {
/* Whether we parsed an ellipsis (`...') just before the declarator,
to indicate this is a parameter pack. */
BOOL_BITFIELD parameter_pack_p : 1;
+ location_t id_loc; /* Currently only set for cdk_id and cdk_function. */
/* Attributes that apply to this declarator. */
tree attributes;
/* For all but cdk_id and cdk_error, the contained declarator. For
cdk_id and cdk_error, guaranteed to be NULL. */
cp_declarator *declarator;
- location_t id_loc; /* Currently only set for cdk_id and cdk_function. */
union {
/* For identifiers. */
struct {
@@ -4809,7 +4810,7 @@ extern const char *class_key_or_enum_as_string (tree);
extern void print_instantiation_context (void);
extern void maybe_warn_variadic_templates (void);
extern void maybe_warn_cpp0x (cpp0x_warn_str str);
-extern bool pedwarn_cxx98 (location_t, int, const char *, ...) ATTRIBUTE_GCC_CXXDIAG(3,4);
+extern bool pedwarn_cxx98 (location_t, int, const char *, ...) ATTRIBUTE_GCC_DIAG(3,4);
/* in except.c */
extern void init_exception_processing (void);
@@ -5370,6 +5371,8 @@ extern tree cp_build_array_ref (location_t, tree, tree,
tsubst_flags_t);
extern tree get_member_function_from_ptrfunc (tree *, tree);
extern tree cp_build_function_call (tree, tree, tsubst_flags_t);
+extern tree cp_build_function_call_nary (tree, tsubst_flags_t, ...)
+ ATTRIBUTE_SENTINEL;
extern tree cp_build_function_call_vec (tree, VEC(tree,gc) **,
tsubst_flags_t);
extern tree build_x_binary_op (enum tree_code, tree,
@@ -5407,7 +5410,8 @@ extern bool error_type_p (const_tree);
extern int ptr_reasonably_similar (const_tree, const_tree);
extern tree build_ptrmemfunc (tree, tree, int, bool);
extern int cp_type_quals (const_tree);
-extern bool cp_type_readonly (const_tree);
+extern int type_memfn_quals (const_tree);
+extern tree apply_memfn_quals (tree, cp_cv_quals);
extern bool cp_has_mutable_p (const_tree);
extern bool at_least_as_qualified_p (const_tree, const_tree);
extern void cp_apply_type_quals_to_decl (int, tree);