aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/parser.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 06a4e31..54ed775 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2019-11-02 Jakub Jelinek <jakub@redhat.com>
+ PR c++/89640
+ * parser.c (cp_parser_decl_specifier_seq): Don't parse attributes
+ if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR.
+
PR c++/88335 - Implement P1073R3: Immediate functions
* cp-tree.h (struct lang_decl_fn): Add immediate_fn_p bit.
(DECL_IMMEDIATE_FUNCTION_P, SET_DECL_IMMEDIATE_FUNCTION_P): Define.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 516c14b..3ed282f 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -13994,7 +13994,8 @@ cp_parser_decl_specifier_seq (cp_parser* parser,
if (!start_token)
start_token = token;
/* Handle attributes. */
- if (cp_next_tokens_can_be_attribute_p (parser))
+ if ((flags & CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR) == 0
+ && cp_next_tokens_can_be_attribute_p (parser))
{
/* Parse the attributes. */
tree attrs = cp_parser_attributes_opt (parser);