aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
committerIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
commite252b51ccde010cbd2a146485d8045103cd99533 (patch)
treee060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/cp/parser.h
parentf10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff)
parent104c05c5284b7822d770ee51a7d91946c7e56d50 (diff)
downloadgcc-e252b51ccde010cbd2a146485d8045103cd99533.zip
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/cp/parser.h')
-rw-r--r--gcc/cp/parser.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/cp/parser.h b/gcc/cp/parser.h
index d587cf2..3669587 100644
--- a/gcc/cp/parser.h
+++ b/gcc/cp/parser.h
@@ -113,6 +113,14 @@ struct GTY (()) cp_lexer {
/* True if we're in the context of parsing a pragma, and should not
increment past the end-of-line marker. */
bool in_pragma;
+
+ /* True if we're in the context of OpenMP directives written as C++11
+ attributes turned into pragma. */
+ bool in_omp_attribute_pragma;
+
+ /* True for in_omp_attribute_pragma lexer that should be destroyed
+ when it is no longer in use. */
+ bool orphan_p;
};
@@ -208,13 +216,14 @@ struct cp_omp_declare_simd_data {
bool error_seen; /* Set if error has been reported. */
bool fndecl_seen; /* Set if one fn decl/definition has been seen already. */
bool variant_p; /* Set for #pragma omp declare variant. */
+ location_t loc;
vec<cp_token_cache_ptr> tokens;
- tree clauses;
+ tree *attribs[2];
};
/* Helper data structure for parsing #pragma acc routine. */
struct cp_oacc_routine_data : cp_omp_declare_simd_data {
- location_t loc;
+ tree clauses;
};
/* The cp_parser structure represents the C++ parser. */
@@ -350,6 +359,10 @@ struct GTY(()) cp_parser {
is terminated by colon. */
bool colon_doesnt_start_class_def_p;
+ /* TRUE if we are parsing an objective c message, and ':' is permitted
+ to terminate an assignment-expression. */
+ bool objective_c_message_context_p;
+
/* If non-NULL, then we are parsing a construct where new type
definitions are not permitted. The string stored here will be
issued as an error message if a type is defined. */
@@ -388,6 +401,9 @@ struct GTY(()) cp_parser {
identifiers) rather than an explicit template parameter list. */
bool fully_implicit_function_template_p;
+ /* TRUE if omp::directive or omp::sequence attributes may not appear. */
+ bool omp_attrs_forbidden_p;
+
/* Tracks the function's template parameter list when declaring a function
using generic type parameters. This is either a new chain in the case of a
fully implicit function template or an extension of the function's existing