public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50817] New: G++ emits errors containing lowered vtable references
@ 2011-10-21 8:17 manu at gcc dot gnu.org
2011-10-21 8:19 ` [Bug c++/50817] " manu at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: manu at gcc dot gnu.org @ 2011-10-21 8:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50817
Bug #: 50817
Summary: G++ emits errors containing lowered vtable references
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: manu@gcc.gnu.org
struct a {
virtual int bar();
};
struct foo : public virtual a {
};
void test(foo *P) {
return P->bar() + *P;
}
g++ revision 180166:
void test(foo*)
vtable.cc:9:22: error: no match for ‘operator+’ in ‘(((a*)P) +
((sizetype)(*(long int*)(P->foo::<anonymous>.a::_vptr.a +
0xffffffffffffffffffffffffffffffe0u))))->a::bar() + * P’
vtable.cc:9:22: error: return-statement with a value, in function returning
'void' [-fpermissive]
clang:
t.cc:9:18: error: invalid operands to binary expression ('int' and 'foo')
return P->bar() + *P;
~~~~~~~~ ^ ~~
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50817] G++ emits errors containing lowered vtable references
2011-10-21 8:17 [Bug c++/50817] New: G++ emits errors containing lowered vtable references manu at gcc dot gnu.org
@ 2011-10-21 8:19 ` manu at gcc dot gnu.org
2011-10-21 8:34 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu.org @ 2011-10-21 8:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50817
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paolo.carlini at oracle dot
| |com
Version|unknown |4.7.0
--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-10-21 08:18:43 UTC ---
Which has a simple fix: Do not print expressions but types like clang does.
This fix will also fix a couple of other PRs.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50817] G++ emits errors containing lowered vtable references
2011-10-21 8:17 [Bug c++/50817] New: G++ emits errors containing lowered vtable references manu at gcc dot gnu.org
2011-10-21 8:19 ` [Bug c++/50817] " manu at gcc dot gnu.org
@ 2011-10-21 8:34 ` redi at gcc dot gnu.org
2011-10-21 8:35 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2011-10-21 8:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50817
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-10-21
Ever Confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-10-21 08:33:28 UTC ---
wow! I've seen some bad ones, but this is the worst example of trying to
reconstruct expressions!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50817] G++ emits errors containing lowered vtable references
2011-10-21 8:17 [Bug c++/50817] New: G++ emits errors containing lowered vtable references manu at gcc dot gnu.org
2011-10-21 8:19 ` [Bug c++/50817] " manu at gcc dot gnu.org
2011-10-21 8:34 ` redi at gcc dot gnu.org
@ 2011-10-21 8:35 ` redi at gcc dot gnu.org
2011-10-21 10:17 ` manu at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2011-10-21 8:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50817
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-10-21 08:34:47 UTC ---
I'm not sure this qualifies as an enhancement, I'd call it a plain ol' bug
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50817] G++ emits errors containing lowered vtable references
2011-10-21 8:17 [Bug c++/50817] New: G++ emits errors containing lowered vtable references manu at gcc dot gnu.org
` (2 preceding siblings ...)
2011-10-21 8:35 ` redi at gcc dot gnu.org
@ 2011-10-21 10:17 ` manu at gcc dot gnu.org
2011-10-21 11:32 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu.org @ 2011-10-21 10:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50817
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Severity|enhancement |normal
--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-10-21 10:16:44 UTC ---
(In reply to comment #2)
> wow! I've seen some bad ones, but this is the worst example of trying to
> reconstruct expressions!
It is a very old and well-known example: http://clang.llvm.org/diagnostics.html
(In reply to comment #3)
> I'm not sure this qualifies as an enhancement, I'd call it a plain ol' bug
As you wish.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50817] G++ emits errors containing lowered vtable references
2011-10-21 8:17 [Bug c++/50817] New: G++ emits errors containing lowered vtable references manu at gcc dot gnu.org
` (3 preceding siblings ...)
2011-10-21 10:17 ` manu at gcc dot gnu.org
@ 2011-10-21 11:32 ` paolo.carlini at oracle dot com
2011-10-21 11:39 ` manu at gcc dot gnu.org
2011-12-01 17:51 ` manu at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-21 11:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50817
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-21 11:32:16 UTC ---
Of course agreed about the substance, but I'm still finding a bit puzzling the
"simple fix" assessment, I don't see tons of lazy people around not willing to
spend 5 minutes on this, do you? ;)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50817] G++ emits errors containing lowered vtable references
2011-10-21 8:17 [Bug c++/50817] New: G++ emits errors containing lowered vtable references manu at gcc dot gnu.org
` (4 preceding siblings ...)
2011-10-21 11:32 ` paolo.carlini at oracle dot com
@ 2011-10-21 11:39 ` manu at gcc dot gnu.org
2011-12-01 17:51 ` manu at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu.org @ 2011-10-21 11:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50817
--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-10-21 11:38:43 UTC ---
(In reply to comment #5)
> Of course agreed about the substance, but I'm still finding a bit puzzling the
> "simple fix" assessment, I don't see tons of lazy people around not willing to
> spend 5 minutes on this, do you? ;)
Of course, my "simple" was meant to be "conceptually simple". I know by
experience how much effort takes to fix any bug at all in GCC, and in
particular, trying to get a patch approved to fix this will end up in an
endless discussion whether the expression could be better pretty-printed. Not a
five minutes fix for sure.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50817] G++ emits errors containing lowered vtable references
2011-10-21 8:17 [Bug c++/50817] New: G++ emits errors containing lowered vtable references manu at gcc dot gnu.org
` (5 preceding siblings ...)
2011-10-21 11:39 ` manu at gcc dot gnu.org
@ 2011-12-01 17:51 ` manu at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu.org @ 2011-12-01 17:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50817
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
--- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-12-01 17:50:25 UTC ---
Duplicate.
*** This bug has been marked as a duplicate of bug 22238 ***
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-12-01 17:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-21 8:17 [Bug c++/50817] New: G++ emits errors containing lowered vtable references manu at gcc dot gnu.org
2011-10-21 8:19 ` [Bug c++/50817] " manu at gcc dot gnu.org
2011-10-21 8:34 ` redi at gcc dot gnu.org
2011-10-21 8:35 ` redi at gcc dot gnu.org
2011-10-21 10:17 ` manu at gcc dot gnu.org
2011-10-21 11:32 ` paolo.carlini at oracle dot com
2011-10-21 11:39 ` manu at gcc dot gnu.org
2011-12-01 17:51 ` manu 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).