This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/61416] New: incorrect struct tag in diagnostic
- From: "tromey at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Jun 2014 19:47:43 +0000
- Subject: [Bug c/61416] New: incorrect struct tag in diagnostic
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61416
Bug ID: 61416
Summary: incorrect struct tag in diagnostic
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tromey at gcc dot gnu.org
Consider this source:
struct ptid
{
int x;
};
typedef struct ptid ptid_t;
int whatever (void *arg)
{
ptid_t *r = arg;
return r->x;
}
Compile it with -Wc++-compat:
barimba. gcc --syntax-only -Wc++-compat /tmp/r.c
/tmp/r.c: In function âwhateverâ:
/tmp/r.c:10:15: warning: request for implicit conversion from âvoid *â to
âstruct ptid_t *â not permitted in C++ [-Wc++-compat]
ptid_t *r = arg;
^
Note that the error mentions "struct ptid_t". However, that is
not a valid name for the type.