[Bug c++/85277] [8 Regression] Broken diagnostic for offsetof with static member function

2018-04-09 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85277

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #3 from Jason Merrill  ---
Fixed.

[Bug c++/85277] [8 Regression] Broken diagnostic for offsetof with static member function

2018-04-09 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85277

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Mon Apr  9 20:40:06 2018
New Revision: 259254

URL: https://gcc.gnu.org/viewcvs?rev=259254=gcc=rev
Log:
PR c++/85277 - ICE with invalid offsetof.

* semantics.c (finish_offsetof): Avoid passing non-DECL to %qD.
Adjust -Winvalid-offsetof diagnostic to say conditionally supported.

Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/g++.dg/ext/builtin-offsetof1.C
trunk/gcc/testsuite/g++.dg/other/offsetof3.C
trunk/gcc/testsuite/g++.dg/other/offsetof5.C
trunk/gcc/testsuite/g++.dg/other/offsetof8.C

[Bug c++/85277] [8 Regression] Broken diagnostic for offsetof with static member function

2018-04-09 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85277

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/85277] [8 Regression] Broken diagnostic for offsetof with static member function

2018-04-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85277

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-09
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Started with r254712.  Before it was rejected with:
pr85277.C:5:50: error: cannot apply ‘offsetof’ to member function ‘static int
bar::baz()’
 int bv0 = __builtin_offsetof(volatile bar, baz[0]);

[Bug c++/85277] [8 Regression] Broken diagnostic for offsetof with static member function

2018-04-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85277

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
   Target Milestone|--- |8.0