[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-18 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 --- Comment #14 from fabien at gcc dot gnu.org 2011-11-18 20:32:08 UTC --- Author: fabien Date: Fri Nov 18 20:32:04 2011 New Revision: 181492 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=181492 Log: gcc/testsuite/ChangeLog 2011-11-18

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-18 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 fabien at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-17 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 --- Comment #1 from fabien at gcc dot gnu.org 2011-11-17 09:25:55 UTC --- Yet another bug caused by my recent changes with using declarations.

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-17 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 fabien at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-17 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 --- Comment #3 from fabien at gcc dot gnu.org 2011-11-17 10:21:30 UTC --- (In reply to comment #2) (In reply to comment #0) [...] Jason, I'd like to run the testsuite without this 7 member rule, how could I do that ? To clarify, I mean 0

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 --- Comment #4 from Jason Merrill jason at gcc dot gnu.org 2011-11-17 15:17:35 UTC --- (In reply to comment #2) There is a strange thing here, if we reach 7 members in a class, things are done differently in the compiler. Jason, I'd like to

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 --- Comment #5 from Jason Merrill jason at gcc dot gnu.org 2011-11-17 19:32:13 UTC --- It looks like the sorted fields code in lookup_field_1 needs to handle using_decl like the unsorted fields code does. I think this will also fix PR51141

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-17 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 --- Comment #6 from fabien at gcc dot gnu.org 2011-11-17 20:24:56 UTC --- (In reply to comment #5) It looks like the sorted fields code in lookup_field_1 needs to handle using_decl like the unsorted fields code does. I think this will also fix

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-17 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 --- Comment #7 from fabien at gcc dot gnu.org 2011-11-17 20:57:16 UTC --- FYI, it fixes the following PRs: c++/51190, c++/51189, c++/51188, c++/51152, c++/51141.

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-17 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 fabien at gcc dot gnu.org changed: What|Removed |Added CC||reichelt at gcc dot gnu.org

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-17 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 --- Comment #9 from fabien at gcc dot gnu.org 2011-11-17 20:59:37 UTC --- *** Bug 51189 has been marked as a duplicate of this bug. ***

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-17 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 fabien at gcc dot gnu.org changed: What|Removed |Added CC||markus at trippelsdorf dot

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 --- Comment #12 from Jason Merrill jason at gcc dot gnu.org 2011-11-17 21:03:31 UTC --- (In reply to comment #6) do -field = fields[i--]; +field = strip_using_decl (fields[i--]); while (i = lo

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-17 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 fabien at gcc dot gnu.org changed: What|Removed |Added CC||cas43 at cs dot

[Bug c++/51188] invalid static_cast from type 'XBase' to type 'int'

2011-11-17 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51188 --- Comment #13 from fabien at gcc dot gnu.org 2011-11-17 21:53:15 UTC --- (In reply to comment #12) Let's wait and strip_using_decl after the loop (i.e. at the return statement), since a USING_DECL has the same name. We also need to check