diff options
author | Marek Polacek <polacek@redhat.com> | 2015-02-13 22:07:36 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2015-02-13 22:07:36 +0000 |
commit | e5d9235ba945870c20a70499d5565edfb2bd4264 (patch) | |
tree | 50442a9d007f4a9fd04ac483f5f356867e8c3cd7 /gcc/c | |
parent | ef796bef889d8a1590430a9da06c40ec4977d79e (diff) | |
download | gcc-e5d9235ba945870c20a70499d5565edfb2bd4264.zip gcc-e5d9235ba945870c20a70499d5565edfb2bd4264.tar.gz gcc-e5d9235ba945870c20a70499d5565edfb2bd4264.tar.bz2 |
re PR c/65050 (Show the type for "array type has incomplete element type" error)
PR c/65050
* c-decl.c (grokdeclarator): Print also the type when giving
the error message about array's incomplete element type.
* gcc.dg/pr65050.c: New test.
From-SVN: r220698
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c/c-decl.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index ab917cb..08955a4 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2015-02-13 Marek Polacek <polacek@redhat.com> + + PR c/65050 + * c-decl.c (grokdeclarator): Print also the type when giving + the error message about array's incomplete element type. + 2015-02-11 Jakub Jelinek <jakub@redhat.com> PR c/64824 diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 48c2bcb..4fd3239 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -5962,7 +5962,8 @@ grokdeclarator (const struct c_declarator *declarator, /* Complain about arrays of incomplete types. */ if (!COMPLETE_TYPE_P (type)) { - error_at (loc, "array type has incomplete element type"); + error_at (loc, "array type has incomplete element type %qT", + type); type = error_mark_node; } else |