Qing Zhao 2a27ae32fa Add a new warning option -Wstrict-flex-arrays.
'-Wstrict-flex-arrays'
     Warn about inproper usages of flexible array members according to
     the LEVEL of the 'strict_flex_array (LEVEL)' attribute attached to
     the trailing array field of a structure if it's available,
     otherwise according to the LEVEL of the option
     '-fstrict-flex-arrays=LEVEL'.

     This option is effective only when LEVEL is bigger than 0.
     Otherwise, it will be ignored with a warning.

     when LEVEL=1, warnings will be issued for a trailing array
     reference of a structure that have 2 or more elements if the
     trailing array is referenced as a flexible array member.

     when LEVEL=2, in addition to LEVEL=1, additional warnings will be
     issued for a trailing one-element array reference of a structure if
     the array is referenced as a flexible array member.

     when LEVEL=3, in addition to LEVEL=2, additional warnings will be
     issued for a trailing zero-length array reference of a structure if
     the array is referenced as a flexible array member.

gcc/ChangeLog:

	* doc/invoke.texi: Document -Wstrict-flex-arrays option.
	* gimple-array-bounds.cc (check_out_of_bounds_and_warn): Add two more
	arguments.
	(array_bounds_checker::check_array_ref): Issue warnings for
	-Wstrict-flex-arrays.
	* opts.cc (finish_options): Issue warning for unsupported combination
	of -Wstrict_flex_arrays and -fstrict-flex-array.
	* tree-vrp.cc (execute_ranger_vrp): Enable the pass when
	warn_strict_flex_array is true.

gcc/c-family/ChangeLog:

	* c.opt (Wstrict-flex-arrays): New option.

gcc/testsuite/ChangeLog:

	* gcc.dg/Warray-bounds-flex-arrays-1.c: Update testing case with
	-Wstrict-flex-arrays.
	* gcc.dg/Warray-bounds-flex-arrays-2.c: Likewise.
	* gcc.dg/Warray-bounds-flex-arrays-3.c: Likewise.
	* gcc.dg/Warray-bounds-flex-arrays-4.c: Likewise.
	* gcc.dg/Warray-bounds-flex-arrays-5.c: Likewise.
	* gcc.dg/Warray-bounds-flex-arrays-6.c: Likewise.
	* c-c++-common/Wstrict-flex-arrays.c: New test.
	* gcc.dg/Wstrict-flex-arrays-2.c: New test.
	* gcc.dg/Wstrict-flex-arrays-3.c: New test.
	* gcc.dg/Wstrict-flex-arrays.c: New test.
2022-12-16 17:25:42 +00:00
2022-11-24 00:17:47 +00:00
2022-11-15 08:32:29 +00:00
2022-11-24 00:17:47 +00:00
2022-09-01 00:17:39 +00:00
2022-08-31 00:16:45 +00:00
2022-12-15 00:17:29 +00:00
2022-11-24 00:17:47 +00:00
2022-08-26 00:16:21 +00:00
2022-11-17 00:16:52 +00:00
2022-12-11 00:17:43 +00:00
2022-11-02 00:17:38 +00:00
2022-11-24 00:17:47 +00:00
2022-12-08 00:17:45 +00:00
2022-11-24 00:17:47 +00:00
2022-12-09 00:18:54 +00:00
2022-12-16 00:17:46 +00:00
2022-12-12 14:18:14 -08:00
2022-11-24 00:17:47 +00:00
2022-12-12 00:22:21 +00:00
2022-12-14 00:18:37 +00:00
2022-10-13 00:17:37 +00:00
2022-11-24 00:17:47 +00:00
2022-12-01 00:17:51 +00:00
2022-11-24 00:17:47 +00:00
2022-07-19 17:07:04 +03:00
2021-12-21 09:10:57 +01:00
2022-12-14 17:43:08 +00:00
2022-12-09 11:08:55 +01:00
2022-12-14 17:43:08 +00:00

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.
S
Description
Yggdrasil port of the GNU Compiler Collection
Readme 978 MiB
Languages
C++ 33%
C 27.4%
Ada 13%
Go 7.1%
D 7%
Other 12.1%