This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/63657] [4.9/5 regression] -Wunused-variable: warning supressed by virtual dtor
- From: "petschy at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 09 Nov 2014 11:30:23 +0000
- Subject: [Bug c++/63657] [4.9/5 regression] -Wunused-variable: warning supressed by virtual dtor
- Auto-submitted: auto-generated
- References: <bug-63657-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63657
petschy at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|DUPLICATE |---
--- Comment #5 from petschy at gmail dot com ---
To further prove my case, here is the disassembly of foo() and bar(). As
expected, they are identical, no ctors/dtors are ever called, so there can be
no side effects.
Dump of assembler code for function foo():
0x0000000000400766 <+0>: push %rbp
0x0000000000400767 <+1>: mov %rsp,%rbp
0x000000000040076a <+4>: sub $0x10,%rsp
0x000000000040076e <+8>: callq 0x400797 <getfoo()>
0x0000000000400773 <+13>: mov %rax,-0x8(%rbp)
0x0000000000400777 <+17>: leaveq
0x0000000000400778 <+18>: retq
End of assembler dump.
Dump of assembler code for function bar():
0x0000000000400779 <+0>: push %rbp
0x000000000040077a <+1>: mov %rsp,%rbp
0x000000000040077d <+4>: sub $0x10,%rsp
0x0000000000400781 <+8>: callq 0x4007a2 <getbar()>
0x0000000000400786 <+13>: mov %rax,-0x8(%rbp)
0x000000000040078a <+17>: leaveq
0x000000000040078b <+18>: retq
End of assembler dump.