Canonicalize names of attributes

Programming / Compilers / GCC - marxin [138bc75d-0d04-0410-961f-82ee72b054a4] - 7 August 2017 04:37 EDT

2017-08-07 Martin Liska

- attribs.h (canonicalize_attr_name): New function. (cmp_attribs): Move from c-format.c and adjusted. (is_attribute_p): Moved from tree.h.
- tree-inline.c: Add new includes.
- tree.c (cmp_attrib_identifiers): Use cmp_attribs. (private_is_attribute_p): Remove. (private_lookup_attribute): Likewise. (private_lookup_attribute_by_prefix): Simplify. (remove_attribute): Use is_attribute_p.
- tree.h: Remove removed declarations. 2017-08-07 Martin Liska

- array-notation-common.c: Add new includes.
- c-format.c( handle_format_attribute): Canonicalize a format function name.
- c-lex.c (c_common_has_attribute): Canonicalize name of an attribute.
- c-pretty-print.c: Add new include. 2017-08-07 Martin Liska

- parser.c (cp_parser_gnu_attribute_list): Canonicalize name of an attribute. (cp_parser_std_attribute): Likewise.
- tree.c: Add new include. 2017-08-07 Martin Liska

- c-parser.c (c_parser_attributes): Canonicalize name of an attribute. 2017-08-07 Martin Liska

- go-gcc.cc (Gcc_backend::function): Look up for no_split_stack and not __no_split_stack__. 2017-08-07 Martin Liska

- g++.dg/cpp0x/pr65558.C: Update scanned pattern.
- gcc.dg/parm-impl-decl-1.c: Likewise.
- gcc.dg/parm-impl-decl-3.c: Likewise.
- gcc.dg/Wattributes-5.c: New test.

1610e7f Canonicalize names of attributes.
gcc/ChangeLog | 13 ++++
gcc/attribs.h | 43 +++++++++++++
gcc/c-family/ChangeLog | 9 +++
gcc/c-family/array-notation-common.c | 2 +
gcc/c-family/c-format.c | 24 ++------
gcc/c-family/c-lex.c | 1 +
gcc/c-family/c-pretty-print.c | 1 +
gcc/c/ChangeLog | 5 ++
gcc/c/c-parser.c | 3 +
gcc/cp/ChangeLog | 7 +++
gcc/cp/parser.c | 6 +-
gcc/cp/tree.c | 1 +
gcc/go/ChangeLog | 5 ++
gcc/go/go-gcc.cc | 2 +-
gcc/testsuite/ChangeLog | 7 +++
gcc/testsuite/g++.dg/cpp0x/pr65558.C | 2 +-
gcc/testsuite/gcc.dg/Wattributes-5.c | 13 ++++
gcc/testsuite/gcc.dg/parm-impl-decl-1.c | 2 +-
gcc/testsuite/gcc.dg/parm-impl-decl-3.c | 2 +-
gcc/tree-inline.c | 3 +-
gcc/tree.c | 104 +++++---------------------------
gcc/tree.h | 23 +------
22 files changed, 141 insertions(+), 137 deletions(-)

Upstream: gcc.gnu.org


  • Share