diff options
author | Brendan Kehoe <brendan@cygnus.com> | 1999-10-06 17:48:17 +0000 |
---|---|---|
committer | Brendan Kehoe <brendan@gcc.gnu.org> | 1999-10-06 13:48:17 -0400 |
commit | a4156b889dd6193cdf28e9e3ba2b923d4e04d7f1 (patch) | |
tree | 85610fe0ccf297d310fd839cbb78bb808e8385c4 /gcc/cp | |
parent | 2ee2956a633b795e8fdb06dc175115d5a80cfdd0 (diff) | |
download | gcc-a4156b889dd6193cdf28e9e3ba2b923d4e04d7f1.zip gcc-a4156b889dd6193cdf28e9e3ba2b923d4e04d7f1.tar.gz gcc-a4156b889dd6193cdf28e9e3ba2b923d4e04d7f1.tar.bz2 |
decl.c (grokdeclarator): Only warn about non-zero arrays if !in_system_header (linux socketbits.h can...
* decl.c (grokdeclarator): Only warn about non-zero arrays if
!in_system_header (linux socketbits.h can give this for
__cmsg_data, which is using a GNU extension).
From-SVN: r29842
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3eeadc9..c601526 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +1999-10-06 Brendan Kehoe <brendan@cygnus.com> + + * decl.c (grokdeclarator): Only warn about non-zero arrays if + !in_system_header (linux socketbits.h can give this for + __cmsg_data, which is using a GNU extension). + 1999-10-05 Mark Mitchell <mark@codesourcery.com> * decl2.c (start_static_storage_duration_function): Push the diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 877f2c4..c425fcb 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -9883,7 +9883,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) dname); size = integer_one_node; } - if (pedantic && integer_zerop (size)) + if (pedantic && !in_system_header && integer_zerop (size)) cp_pedwarn ("ANSI C++ forbids zero-size array `%D'", dname); if (TREE_CONSTANT (size)) { |