diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-03-11 16:12:22 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-03-11 16:12:22 -0800 |
commit | bc636c218f2b28da06cd1404d5b35d1f8cc43fd1 (patch) | |
tree | 764937d8460563db6132d7c75e19b95ef3ea6ea8 /gcc/c | |
parent | 89d7be42db00cd0953e7d4584877cf50a56ed046 (diff) | |
parent | 7ad5a72c8bc6aa71a0d195ddfa207db01265fe0b (diff) | |
download | gcc-bc636c218f2b28da06cd1404d5b35d1f8cc43fd1.zip gcc-bc636c218f2b28da06cd1404d5b35d1f8cc43fd1.tar.gz gcc-bc636c218f2b28da06cd1404d5b35d1f8cc43fd1.tar.bz2 |
Merge from trunk revision 7ad5a72c8bc6aa71a0d195ddfa207db01265fe0b.
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 16 | ||||
-rw-r--r-- | gcc/c/c-decl.c | 4 | ||||
-rw-r--r-- | gcc/c/c-parser.c | 2 | ||||
-rw-r--r-- | gcc/c/c-typeck.c | 4 |
4 files changed, 24 insertions, 2 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 1fee3e7..214e57b 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,19 @@ +2021-03-05 Tobias Burnus <tobias@codesourcery.com> + + PR c/99137 + * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions. + +2021-02-24 Martin Sebor <msebor@redhat.com> + + PR middle-end/97172 + * c-decl.c (free_attr_access_data): Clear attribute arg spec. + +2021-02-18 Jakub Jelinek <jakub@redhat.com> + + PR c/99136 + * c-typeck.c (c_finish_return): Don't wrap retval into + EXCESS_PRECISION_EXPR in functions that return void. + 2021-02-11 Marek Polacek <polacek@redhat.com> * c-parser.c (c_parser_if_statement): Use vec_free. diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index a5852a3..b559ed5 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -12166,6 +12166,10 @@ free_attr_access_data () /* Iterate over all functions declared in the translation unit. */ FOR_EACH_FUNCTION (n) { + for (tree parm = DECL_ARGUMENTS (n->decl); parm; parm = TREE_CHAIN (parm)) + if (tree attrs = DECL_ATTRIBUTES (parm)) + attr_access::free_lang_data (attrs); + tree fntype = TREE_TYPE (n->decl); if (!fntype) continue; diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index 2a49d07..5cdeb21 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -14332,7 +14332,7 @@ c_parser_oacc_clause_async (c_parser *parser, tree list) { c_parser_consume_token (parser); - t = c_parser_expression (parser).value; + t = c_parser_expr_no_commas (parser, NULL).value; if (!INTEGRAL_TYPE_P (TREE_TYPE (t))) c_parser_error (parser, "expected integer expression"); else if (t == error_mark_node diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index 725dc51..4e6d369 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -10740,7 +10740,9 @@ c_finish_return (location_t loc, tree retval, tree origtype) retval = TREE_OPERAND (retval, 0); } retval = c_fully_fold (retval, false, NULL); - if (semantic_type) + if (semantic_type + && valtype != NULL_TREE + && TREE_CODE (valtype) != VOID_TYPE) retval = build1 (EXCESS_PRECISION_EXPR, semantic_type, retval); } |