diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2005-11-24 02:02:26 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2005-11-24 02:02:26 +0000 |
commit | ff6b6641506a9aeab5dbb01a2ebd214ff3a942ba (patch) | |
tree | e7e85e47eb726ead6275d3e7b3b82823305a9fba /gcc/c-common.h | |
parent | 7fdc03073c4c0f664a6d5f1a5951b07c6e37fa44 (diff) | |
download | gcc-ff6b6641506a9aeab5dbb01a2ebd214ff3a942ba.zip gcc-ff6b6641506a9aeab5dbb01a2ebd214ff3a942ba.tar.gz gcc-ff6b6641506a9aeab5dbb01a2ebd214ff3a942ba.tar.bz2 |
re PR c++/21667 (misleading warning about array subscription)
2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/21667
* c-typeck.c (build_array_ref): Avoid code duplicate. Use
common
C/C++ diagnostic function warn_array_subscript_with_type_char.
* c-common.h (warn_array_subscript_with_type_char): Declare.
* c-common.c (warn_array_subscript_with_type_char): Define.
cp/
2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/21667
* typeck.c (build_array_ref): Avoid code duplicate. Use
common
C/C++ diagnostic function warn_array_subscript_with_type_char.
testsuite/
2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/21667
* gcc.dg/Wchar-subscripts.c: New.
* g++.dg/warn/Wchar-subscripts.C: Likewise.
From-SVN: r107448
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r-- | gcc/c-common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index cf75ed9..96905af 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -836,6 +836,8 @@ extern int complete_array_type (tree *, tree, bool); extern tree builtin_type_for_size (int, bool); +extern void warn_array_subscript_with_type_char (tree); + /* In c-gimplify.c */ extern void c_genericize (tree); extern int c_gimplify_expr (tree *, tree *, tree *); |