public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49387] New: t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
@ 2011-06-13 7:25 mathieu.malaterre at gmail dot com
2011-06-13 9:07 ` [Bug c++/49387] " redi at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: mathieu.malaterre at gmail dot com @ 2011-06-13 7:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49387
Summary: t.cxx:140: error: too many initializers for ‘const
__class_type_info_pseudo’
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: mathieu.malaterre@gmail.com
I am getting this weird compilation error which I am not able to understand
what it means:
$ g++ t.cxx
t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
See attached cxx file.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/49387] t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
2011-06-13 7:25 [Bug c++/49387] New: t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’ mathieu.malaterre at gmail dot com
@ 2011-06-13 9:07 ` redi at gcc dot gnu.org
2011-06-13 9:09 ` mathieu.malaterre at gmail dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: redi at gcc dot gnu.org @ 2011-06-13 9:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49387
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2011.06.13 09:07:08
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-13 09:07:08 UTC ---
the attachment is missing
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/49387] t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
2011-06-13 7:25 [Bug c++/49387] New: t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’ mathieu.malaterre at gmail dot com
2011-06-13 9:07 ` [Bug c++/49387] " redi at gcc dot gnu.org
@ 2011-06-13 9:09 ` mathieu.malaterre at gmail dot com
2011-06-13 9:46 ` redi at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mathieu.malaterre at gmail dot com @ 2011-06-13 9:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49387
--- Comment #2 from Mathieu Malaterre <mathieu.malaterre at gmail dot com> 2011-06-13 09:09:15 UTC ---
Created attachment 24505
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24505
Test case
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/49387] t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
2011-06-13 7:25 [Bug c++/49387] New: t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’ mathieu.malaterre at gmail dot com
2011-06-13 9:07 ` [Bug c++/49387] " redi at gcc dot gnu.org
2011-06-13 9:09 ` mathieu.malaterre at gmail dot com
@ 2011-06-13 9:46 ` redi at gcc dot gnu.org
2011-06-13 9:50 ` mathieu.malaterre at gmail dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: redi at gcc dot gnu.org @ 2011-06-13 9:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49387
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-13 09:45:51 UTC ---
I can confirm this ... it's a strange one
but in future please provide the information requested:
http://gcc.gnu.org/bugs/
You haven't even said what version of the compiler you're using
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/49387] t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
2011-06-13 7:25 [Bug c++/49387] New: t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’ mathieu.malaterre at gmail dot com
` (2 preceding siblings ...)
2011-06-13 9:46 ` redi at gcc dot gnu.org
@ 2011-06-13 9:50 ` mathieu.malaterre at gmail dot com
2011-06-13 11:54 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mathieu.malaterre at gmail dot com @ 2011-06-13 9:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49387
--- Comment #4 from Mathieu Malaterre <mathieu.malaterre at gmail dot com> 2011-06-13 09:49:41 UTC ---
Test was done a on a debian/squeeze system:
$ g++ --version
g++ (Debian 4.4.5-8) 4.4.5
$ apt-cache policy libboost1.42-dev
libboost1.42-dev:
Installed: 1.42.0-4
Candidate: 1.42.0-4
Version table:
1.42.0-4+b1 0
200 http://ftp.fr.debian.org/debian/ testing/main amd64 Packages
100 http://ftp.fr.debian.org/debian/ unstable/main amd64 Packages
*** 1.42.0-4 0
500 http://ftp.fr.debian.org/debian/ squeeze/main amd64 Packages
100 /var/lib/dpkg/status
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/49387] t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
2011-06-13 7:25 [Bug c++/49387] New: t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’ mathieu.malaterre at gmail dot com
` (3 preceding siblings ...)
2011-06-13 9:50 ` mathieu.malaterre at gmail dot com
@ 2011-06-13 11:54 ` redi at gcc dot gnu.org
2011-06-13 12:40 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: redi at gcc dot gnu.org @ 2011-06-13 11:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49387
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-13 11:53:52 UTC ---
Created attachment 24508
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24508
reduced testcase
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/49387] t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
2011-06-13 7:25 [Bug c++/49387] New: t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’ mathieu.malaterre at gmail dot com
` (4 preceding siblings ...)
2011-06-13 11:54 ` redi at gcc dot gnu.org
@ 2011-06-13 12:40 ` redi at gcc dot gnu.org
2011-06-30 22:51 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: redi at gcc dot gnu.org @ 2011-06-13 12:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49387
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-13 12:39:59 UTC ---
further reduced
#include <typeinfo>
struct ResourceMonitorClient { };
template <typename T> struct ResourcePool : public ResourceMonitorClient {
virtual ~ResourcePool() { }
};
template <typename T> struct BaseWriter {
BaseWriter() {
typeid(ResourcePool<int>*);
}
virtual void run() {
ResourcePool<int> pool;
}
};
BaseWriter<void> b;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/49387] t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
2011-06-13 7:25 [Bug c++/49387] New: t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’ mathieu.malaterre at gmail dot com
` (5 preceding siblings ...)
2011-06-13 12:40 ` redi at gcc dot gnu.org
@ 2011-06-30 22:51 ` jason at gcc dot gnu.org
2011-07-01 0:53 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2011-06-30 22:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49387
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jason at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/49387] t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
2011-06-13 7:25 [Bug c++/49387] New: t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’ mathieu.malaterre at gmail dot com
` (6 preceding siblings ...)
2011-06-30 22:51 ` jason at gcc dot gnu.org
@ 2011-07-01 0:53 ` jason at gcc dot gnu.org
2011-07-01 0:54 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2011-07-01 0:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49387
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2011-07-01 00:53:14 UTC ---
Author: jason
Date: Fri Jul 1 00:53:10 2011
New Revision: 175743
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175743
Log:
PR c++/49387
* rtti.c (get_pseudo_ti_index): Call complete_type.
Added:
trunk/gcc/testsuite/g++.dg/rtti/template1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/rtti.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/49387] t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
2011-06-13 7:25 [Bug c++/49387] New: t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’ mathieu.malaterre at gmail dot com
` (7 preceding siblings ...)
2011-07-01 0:53 ` jason at gcc dot gnu.org
@ 2011-07-01 0:54 ` jason at gcc dot gnu.org
2022-04-29 3:00 ` cvs-commit at gcc dot gnu.org
2022-05-15 16:29 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2011-07-01 0:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49387
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> 2011-07-01 00:53:43 UTC ---
Fixed for 4.7.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/49387] t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
2011-06-13 7:25 [Bug c++/49387] New: t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’ mathieu.malaterre at gmail dot com
` (8 preceding siblings ...)
2011-07-01 0:54 ` jason at gcc dot gnu.org
@ 2022-04-29 3:00 ` cvs-commit at gcc dot gnu.org
2022-05-15 16:29 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-29 3:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49387
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:97b30a399ef561f6f37a2c08c830fdf3141bb504
commit r13-24-g97b30a399ef561f6f37a2c08c830fdf3141bb504
Author: Jason Merrill <jason@redhat.com>
Date: Fri Apr 15 00:11:00 2022 -0400
c++: typeid and instantiation [PR102651]
PR49387 was a problem with initially asking for a typeid for a class
template specialization before it was complete, and later actually filling
in the descriptor when the class was complete, and thus disagreeing on the
form of the descriptor. I fixed that by forcing the class to be complete,
but this testcase shows why that approach is problematic. So instead let's
adjust the type of the descriptor later if needed.
PR c++/102651
PR c++/49387
gcc/cp/ChangeLog:
* rtti.cc (get_tinfo_decl_direct): Don't complete_type.
(emit_tinfo_decl): Update tdesc type if needed.
gcc/testsuite/ChangeLog:
* g++.dg/rtti/typeid-complete1.C: New test.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/49387] t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
2011-06-13 7:25 [Bug c++/49387] New: t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’ mathieu.malaterre at gmail dot com
` (9 preceding siblings ...)
2022-04-29 3:00 ` cvs-commit at gcc dot gnu.org
@ 2022-05-15 16:29 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-15 16:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49387
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:5237059e04d105fe5441fa7434699eea9a34bf1b
commit r12-8378-g5237059e04d105fe5441fa7434699eea9a34bf1b
Author: Jason Merrill <jason@redhat.com>
Date: Fri Apr 15 00:11:00 2022 -0400
c++: typeid and instantiation [PR102651]
PR49387 was a problem with initially asking for a typeid for a class
template specialization before it was complete, and later actually filling
in the descriptor when the class was complete, and thus disagreeing on the
form of the descriptor. I fixed that by forcing the class to be complete,
but this testcase shows why that approach is problematic. So instead let's
adjust the type of the descriptor later if needed.
PR c++/102651
PR c++/49387
gcc/cp/ChangeLog:
* rtti.cc (get_tinfo_decl_direct): Don't complete_type.
(emit_tinfo_decl): Update tdesc type if needed.
gcc/testsuite/ChangeLog:
* g++.dg/rtti/typeid-complete1.C: New test.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-05-15 16:29 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-13 7:25 [Bug c++/49387] New: t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’ mathieu.malaterre at gmail dot com
2011-06-13 9:07 ` [Bug c++/49387] " redi at gcc dot gnu.org
2011-06-13 9:09 ` mathieu.malaterre at gmail dot com
2011-06-13 9:46 ` redi at gcc dot gnu.org
2011-06-13 9:50 ` mathieu.malaterre at gmail dot com
2011-06-13 11:54 ` redi at gcc dot gnu.org
2011-06-13 12:40 ` redi at gcc dot gnu.org
2011-06-30 22:51 ` jason at gcc dot gnu.org
2011-07-01 0:53 ` jason at gcc dot gnu.org
2011-07-01 0:54 ` jason at gcc dot gnu.org
2022-04-29 3:00 ` cvs-commit at gcc dot gnu.org
2022-05-15 16:29 ` cvs-commit at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).