mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-22 19:50:48 +08:00
02a32ab4a6
This patch makes the C++ frontend work with the verify_type_context hook. We need some new type contexts for features that don't exist in C, but otherwise the patch is very similar to the C one. TCTX_CAPTURE_BY_COPY could really be treated as an instance of TCTX_FIELD, but the error message is better if we split it out. 2019-12-06 Richard Sandiford <richard.sandiford@arm.com> gcc/ * target.h (TCTX_ALLOCATION, TCTX_DEALLOCATION, TCTX_EXCEPTIONS) (TCTX_CAPTURE_BY_COPY): New type_context_kinds. * config/aarch64/aarch64-sve-builtins.cc (verify_type_context): Handle them. gcc/cp/ * decl.c (start_decl_1): Use verify_type_context to check whether the target allows variables of a particular type to have static or thread-local storage duration. (check_array_initializer): Use verify_type_context to check whether the target allows a particular type to be used as an array element. (create_array_type_for_decl): Likewise. (cp_finish_decl): Use verify_type_context to check whether the target allows static member variables of a particular type. (grokdeclarator): Likewise. Also use verify_type_context to check whether the target allows non-static member variables of a particular type. * except.c: Include target.h. (is_admissible_throw_operand_or_catch_parameter): Use verify_type_context to check whether the target allows particular types to be thrown and caught. * typeck2.c (add_exception_specifier): Likewise. * init.c (build_new_1): Use verify_type_context to check whether the target allows particular types to be dynamically allocated. (build_vec_delete_1, build_delete): Use verify_type_context to check whether the target allows particular types to be deleted. * lambda.c (add_capture): Use verify_type_context to check whether the target allows particular types to be captured by copy. * pt.c: Include target.h. (instantiate_class_template_1): Use verify_type_context to check whether the target allows non-static member variables of a particular type. * typeck.c (cxx_alignof_expr): Use verify_type_context to check whether the target allows the alignment of a particular type to be measured. (pointer_diff, cp_build_unary_op): Use verify_type_context to check whether the target allows arithmetic involving pointers to particular types. gcc/testsuite/ * g++.dg/ext/sve-sizeless-1.C: New test. * g++.dg/ext/sve-sizeless-2.C: Likewise. From-SVN: r279058
…
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
31.9%
C
31.3%
Ada
12%
D
6.5%
Go
6.4%
Other
11.5%