[Bug c/79983] Improve enum and struct redefinition diagnostic

2017-06-06 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79983

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Marek Polacek  ---
Fixed.

[Bug c/79983] Improve enum and struct redefinition diagnostic

2017-06-06 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79983

--- Comment #1 from Marek Polacek  ---
Author: mpolacek
Date: Tue Jun  6 17:40:34 2017
New Revision: 248927

URL: https://gcc.gnu.org/viewcvs?rev=248927=gcc=rev
Log:
PR c/79983
* c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
ref.
(start_enum): Use the location of TYPE_STUB_DECL of enumtype.

* gcc.dg/pr79983.c: New test.

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

[Bug c/79983] Improve enum and struct redefinition diagnostic

2017-03-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79983

Marek Polacek  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-03-09
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
 Ever confirmed|0   |1