This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/61416] New: incorrect struct tag in diagnostic


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]