gcc/libgomp/testsuite
Marek Polacek 773ec47fe6 re PR c/6940 (taking sizeof array parameter should trigger a warning)
PR c/6940
	* doc/invoke.texi: Document -Wsizeof-array-argument.
c-family/
	* c.opt (Wsizeof-array-argument): New option.
c/
	* c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
	* c-tree.h (C_ARRAY_PARAMETER): Define.
	* c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
	function parameter.
cp/
	* cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
	* decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
	* typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
	function parameter.
testsuite/
	* c-c++-common/Wsizeof-pointer-memaccess1.c: Use
	-Wno-sizeof-array-argument.
	* c-c++-common/Wsizeof-pointer-memaccess2.c: Likewise.
	* g++.dg/warn/Wsizeof-pointer-memaccess-1.C: Likewise.
	* gcc.dg/Wsizeof-pointer-memaccess1.c: Likewise.
	* g++.dg/torture/Wsizeof-pointer-memaccess1.C: Likewise.
	* g++.dg/torture/Wsizeof-pointer-memaccess2.C: Likewise.
	* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Likewise.
	* c-c++-common/sizeof-array-argument.c: New test.
	* gcc.dg/vla-5.c: Add dg-warnings.
../libgomp/	* testsuite/libgomp.c/appendix-a/a.29.1.c (f): Add dg-warnings.

From-SVN: r212312
2014-07-06 19:00:10 +00:00
..
config Update copyright years in libgomp/ 2014-01-02 22:25:54 +00:00
lib libgomp.exp (libgomp_target_compile): If $source matches regex $lang_source_re, add $lang_include_flags to options. 2014-07-03 20:45:35 +02:00
libgomp.c re PR c/6940 (taking sizeof array parameter should trigger a warning) 2014-07-06 19:00:10 +00:00
libgomp.c++ libgomp.exp (libgomp_target_compile): If $source matches regex $lang_source_re, add $lang_include_flags to options. 2014-07-03 20:45:35 +02:00
libgomp.fortran Normalize interface for all *-dg-runtest. 2014-07-04 07:28:17 +02:00
libgomp.graphite libgomp.exp (libgomp_target_compile): If $source matches regex $lang_source_re, add $lang_include_flags to options. 2014-07-03 20:45:35 +02:00
Makefile.am
Makefile.in re PR libstdc++/36104 (gnu-versioned-namespace is broken) 2011-01-20 23:41:24 +00:00