773ec47fe6
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 |
||
---|---|---|
.. | ||
appendix-a | ||
affinity-1.c | ||
atomic-1.c | ||
atomic-2.c | ||
atomic-3.c | ||
atomic-4.c | ||
atomic-5.c | ||
atomic-6.c | ||
atomic-10.c | ||
atomic-11.c | ||
atomic-12.c | ||
atomic-13.c | ||
atomic-14.c | ||
atomic-15.c | ||
atomic-16.c | ||
atomic-17.c | ||
autopar-1.c | ||
barrier-1.c | ||
c.exp | ||
cancel-for-1.c | ||
cancel-for-2.c | ||
cancel-parallel-1.c | ||
cancel-parallel-2.c | ||
cancel-parallel-3.c | ||
cancel-sections-1.c | ||
cancel-taskgroup-1.c | ||
cancel-taskgroup-2.c | ||
collapse-1.c | ||
collapse-2.c | ||
collapse-3.c | ||
copyin-1.c | ||
copyin-2.c | ||
copyin-3.c | ||
critical-1.c | ||
critical-2.c | ||
debug-1.c | ||
depend-1.c | ||
depend-2.c | ||
depend-3.c | ||
depend-4.c | ||
for-1.c | ||
for-1.h | ||
for-2.c | ||
for-2.h | ||
for-3.c | ||
icv-1.c | ||
icv-2.c | ||
lib-1.c | ||
lib-2.c | ||
lock-1.c | ||
lock-2.c | ||
lock-3.c | ||
loop-1.c | ||
loop-2.c | ||
loop-3.c | ||
loop-4.c | ||
loop-5.c | ||
loop-6.c | ||
loop-7.c | ||
loop-8.c | ||
loop-9.c | ||
loop-10.c | ||
loop-11.c | ||
loop-12.c | ||
loop-13.c | ||
loop-14.c | ||
loop-15.c | ||
loop-16.c | ||
nested-1.c | ||
nested-2.c | ||
nested-3.c | ||
nestedfn-1.c | ||
nestedfn-2.c | ||
nestedfn-3.c | ||
nestedfn-4.c | ||
nestedfn-5.c | ||
nestedfn-6.c | ||
nqueens-1.c | ||
omp_hello.c | ||
omp_matvec.c | ||
omp_orphan.c | ||
omp_reduction.c | ||
omp_workshare1.c | ||
omp_workshare2.c | ||
omp_workshare3.c | ||
omp_workshare4.c | ||
omp-loop01.c | ||
omp-loop02.c | ||
omp-loop03.c | ||
omp-nested-1.c | ||
omp-parallel-for.c | ||
omp-parallel-if.c | ||
omp-single-1.c | ||
omp-single-2.c | ||
omp-single-3.c | ||
ordered-1.c | ||
ordered-2.c | ||
ordered-3.c | ||
parallel-1.c | ||
pr24455-1.c | ||
pr24455.c | ||
pr26171.c | ||
pr26943-1.c | ||
pr26943-2.c | ||
pr26943-3.c | ||
pr26943-4.c | ||
pr29947-1.c | ||
pr29947-2.c | ||
pr30494.c | ||
pr32362-1.c | ||
pr32362-2.c | ||
pr32362-3.c | ||
pr32468.c | ||
pr33880.c | ||
pr34513.c | ||
pr35130.c | ||
pr35196.c | ||
pr35549.c | ||
pr35625.c | ||
pr36802-1.c | ||
pr36802-2.c | ||
pr36802-3.c | ||
pr38650.c | ||
pr39154.c | ||
pr39591-1.c | ||
pr39591-2.c | ||
pr39591-3.c | ||
pr42029.c | ||
pr42942.c | ||
pr43893.c | ||
pr46886.c | ||
pr48591.c | ||
pr49897-1.c | ||
pr49897-2.c | ||
pr49898-1.c | ||
pr49898-2.c | ||
pr52547.c | ||
pr58392.c | ||
pr58756.c | ||
private-1.c | ||
reduction-1.c | ||
reduction-2.c | ||
reduction-3.c | ||
reduction-4.c | ||
reduction-5.c | ||
reduction-6.c | ||
sections-1.c | ||
sections-2.c | ||
shared-1.c | ||
shared-2.c | ||
shared-3.c | ||
simd-1.c | ||
simd-2.c | ||
simd-3.c | ||
simd-4.c | ||
simd-5.c | ||
simd-6.c | ||
simd-7.c | ||
simd-8.c | ||
simd-9.c | ||
simd-10.c | ||
simd-11.c | ||
simd-12.c | ||
simd-13.c | ||
simd-14.c | ||
simd-15.c | ||
simd-16.c | ||
simd-17.c | ||
single-1.c | ||
single-2.c | ||
sort-1.c | ||
target-1.c | ||
target-2.c | ||
target-3.c | ||
target-4.c | ||
target-5.c | ||
target-6.c | ||
target-7.c | ||
target-8.c | ||
task-1.c | ||
task-2.c | ||
task-3.c | ||
task-4.c | ||
task-5.c | ||
taskgroup-1.c | ||
thread-limit-1.c | ||
thread-limit-2.c | ||
thread-limit-3.c | ||
udr-1.c | ||
udr-2.c | ||
udr-3.c | ||
vla-1.c |