public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/65050] New: Show the type for "array type has incomplete element type" error
@ 2015-02-13 11:46 mpolacek at gcc dot gnu.org
  2015-02-13 11:46 ` [Bug c/65050] " mpolacek at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-02-13 11:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65050

            Bug ID: 65050
           Summary: Show the type for "array type has incomplete element
                    type" error
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org

In the following test case we have a few invalid decls.  It would be nice if
the C FE showed the incomplete element type.

typedef int A[];
struct S { int i; A a[5]; } s;

extern void foo (int p[2][]);
extern void bar (A p[2]);

void
foo (int p[2][])
{
}

void
bar (A p[2])
{
}

struct T;
struct T t[5];
struct U u[] = { { "abc" } };

typedef struct T TT;
TT tt[5];


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/65050] Show the type for "array type has incomplete element type" error
  2015-02-13 11:46 [Bug c/65050] New: Show the type for "array type has incomplete element type" error mpolacek at gcc dot gnu.org
@ 2015-02-13 11:46 ` mpolacek at gcc dot gnu.org
  2015-02-13 22:08 ` mpolacek at gcc dot gnu.org
  2015-02-13 22:09 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-02-13 11:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65050

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-02-13
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I have a patch.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/65050] Show the type for "array type has incomplete element type" error
  2015-02-13 11:46 [Bug c/65050] New: Show the type for "array type has incomplete element type" error mpolacek at gcc dot gnu.org
  2015-02-13 11:46 ` [Bug c/65050] " mpolacek at gcc dot gnu.org
@ 2015-02-13 22:08 ` mpolacek at gcc dot gnu.org
  2015-02-13 22:09 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-02-13 22:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65050

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Fri Feb 13 22:07:36 2015
New Revision: 220698

URL: https://gcc.gnu.org/viewcvs?rev=220698&root=gcc&view=rev
Log:
    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.

Added:
    trunk/gcc/testsuite/gcc.dg/pr65050.c
Modified:
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-decl.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/65050] Show the type for "array type has incomplete element type" error
  2015-02-13 11:46 [Bug c/65050] New: Show the type for "array type has incomplete element type" error mpolacek at gcc dot gnu.org
  2015-02-13 11:46 ` [Bug c/65050] " mpolacek at gcc dot gnu.org
  2015-02-13 22:08 ` mpolacek at gcc dot gnu.org
@ 2015-02-13 22:09 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-02-13 22:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65050

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |5.0

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-13 22:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-13 11:46 [Bug c/65050] New: Show the type for "array type has incomplete element type" error mpolacek at gcc dot gnu.org
2015-02-13 11:46 ` [Bug c/65050] " mpolacek at gcc dot gnu.org
2015-02-13 22:08 ` mpolacek at gcc dot gnu.org
2015-02-13 22:09 ` mpolacek at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).