public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de> To: leemich@ms.com Cc: egcs-bugs@cygnus.com Subject: Re: bug report Date: Fri, 20 Nov 1998 15:28:00 -0000 [thread overview] Message-ID: <199811202324.AAA00544@mira.isdn.cs.tu-berlin.de> (raw) In-Reply-To: <Pine.GSO.3.95k.981120175851.12070A-100000@hegel> [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1316 bytes --] > It's not a different class per se, it's a derived class. Also, the code > works on CC (SUN's) 4.2 as well as Portland Groups compiler. This is both irrelevant. To quote from ISO C++, 5.2.10 [expr.reinterpret.cast]/2: >> The mapping performed by reinterpret_cast is >> implementationÂdefined. [Note: it might, or might not, produce a >> representation different from the original value. ] More detail on pointer-to-pointer conversions is in paragraph 7: >> A pointer to an object can be explicitly converted to a pointer to >> an object of different type.65) Except that converting an rvalue of >> type "pointer to T1" to the type "pointer to T2" (where T1 and T2 >> are object types and where the alignment requirements of T2 are no >> stricter than those of T1) and back to its original type yields the >> original pointer value, the result of such a pointer conversion is >> unspecified. So we could give you any value as Derived*, as long as we restore the original Base* when you reinterpret_cast<Base*>. Your program relies on unspecified behaviour. There is nothing wrong with CC and PCG doing what you expect, but this doesn't mean any other compiler in the world should. If you really need virtual base classes and conversion to derived classes, use polymorphic types instead. Regards, Martin
next prev parent reply other threads:[~1998-11-20 15:28 UTC|newest] Thread overview: 344+ messages / expand[flat|nested] mbox.gz Atom feed top 1998-11-19 23:26 Michael Lee 1998-11-20 14:08 ` Alexandre Oliva 1998-11-20 14:42 ` Martin von Loewis 1998-11-20 15:07 ` Michael Lee 1998-11-20 15:28 ` Martin von Loewis [this message] 1998-11-20 17:31 ` semantics of C++ casts Marc Espie -- strict thread matches above, loose matches on Subject: below -- 2008-08-04 6:49 Bug report Seppo Laitinen 2007-02-21 12:32 bug report Fabio TROVATO 2006-10-05 1:34 ZiZi Zhao 2006-09-12 11:29 poczta-sn 2006-06-08 3:14 Hayashi Eisuke 2006-06-08 21:27 ` Jim Wilson 2006-06-09 1:13 ` Hayashi Eisuke 2006-06-07 8:12 Hayashi Eisuke 2006-06-07 12:30 ` Andrew Pinski [not found] <20040722220045.61900.qmail@web90106.mail.scd.yahoo.com> 2004-08-12 14:26 ` Darko Maksimovic 2004-08-12 14:45 ` Falk Hueffner 2004-08-16 21:53 ` James E Wilson 2004-06-18 3:30 bug_report Ramya Rajan chandar 2004-06-23 23:42 ` bug_report Jim Wilson 2004-05-14 12:25 BUG REPORT aditya varma 2004-05-17 13:37 ` Jim Wilson 2004-03-18 2:00 Bug report zumbi 2004-03-18 9:19 ` Eric Botcazou 2004-02-25 20:36 Pslave 2004-02-26 0:34 ` Jim Wilson 2004-02-23 14:10 bug report zhangming_1978 2004-02-25 2:12 ` Jim Wilson 2004-01-23 15:58 Daniel Sievers 2003-09-09 7:38 Kai Henning 2003-06-12 16:35 Bug report LN 2003-04-20 18:51 bug report Manuel Alguacil Payán 2003-04-20 19:01 ` Andrew Pinski 2003-02-21 5:52 Michael Mantz 2002-12-06 9:21 ghislain.garcon 2002-06-19 2:15 Bug report Niklas J. Saers 2002-06-19 3:58 ` Eric Christopher 2002-05-18 7:06 Aris Adamantiadis 2002-05-17 3:02 Maciek Pudelko 2002-04-25 19:29 Bug Report julia koh 2002-03-13 18:17 bug report amamoon 2001-11-09 2:46 Toshiyuki Maeda 2001-10-13 13:54 Bug report Dirk 2001-07-31 15:13 bug report Edwige et Denis Fournier 2001-08-01 5:20 ` Alexandre Oliva 2001-07-29 6:40 Bug report Dirk Aust 2001-06-20 10:21 Fernando Rodriguez Salazar 2001-05-23 12:10 Bug Report Steve Sun 2001-05-23 13:07 ` Tuukka Tikkanen 2001-05-23 14:18 ` Alexandre Oliva 2001-05-16 9:38 bug report Brian Crouch 2001-05-17 10:40 ` Alexandre Oliva 2001-05-11 2:52 Bug report Mukul Bansal 2001-05-11 6:31 ` Carlo Wood 2001-04-09 10:24 bug report sasha_ka 2001-04-02 14:22 Bug Report Amitoj G. Singh 2001-03-30 7:54 Bug report Abhishek Sharma-RollNo.2000-1 2001-03-20 12:44 Aleksey Grinchenko 2001-02-19 12:38 Bug Report Dave Duchene 2001-01-03 5:49 Bug report Sannier, David G [not found] <200101011933.OAA20906@duck.com> 2001-01-01 12:08 ` bug report Tim Prince 2000-09-20 1:46 BUG report Philippe Benchemoul 2000-08-24 5:51 Bug report Somanos Sar 2000-08-24 19:54 ` Alexandre Oliva 2000-08-24 4:38 Bug Report Somanos Sar [not found] <Pine.LNX.4.10.10008131438030.26283-100000@linux05.zdv.uni-tuebingen.de> 2000-08-14 11:17 ` bug report Alexandre Oliva 2000-08-03 2:34 Anders Linden 2000-08-02 22:09 Bug Report Dirk Aust 2000-07-27 11:13 Ben Hekster [not found] <s9660731.068@EM.AGR.CA> 2000-07-07 14:34 ` Bug report Martin v. Loewis 2000-06-27 6:00 Marc Duflot 2000-06-26 20:19 bug report Gregory Hosler 2000-06-26 20:48 ` Philipp Thomas [not found] ` <20000626205156.R279@wolery.cumb.org> [not found] ` <orpup3rnsk.fsf@guarana.lsd.ic.unicamp.br> 2000-06-27 11:25 ` Zack Weinberg 2000-06-27 13:25 ` Martin v. Loewis 2000-05-11 9:55 Steven A. Johnson 2000-05-02 9:40 Michael (Micksa) Slade [not found] <Pine.GSO.4.10.10004270914490.7403-100000@icarus.cc.uic.edu> 2000-04-27 13:07 ` Bug Report Martin v. Loewis [not found] ` <01c401bfb069$e3a1a720$0100000a@TIMYX18EWDT6RQ> 2000-04-27 13:08 ` Martin v. Loewis 2000-04-26 15:20 Yu Di [not found] <38FC8062.41C6@isr.isr.ist.utl.pt> 2000-04-18 13:48 ` BUG REPORT Martin v. Loewis 2000-04-12 17:11 bug report Andrew Bordner 2000-04-13 1:00 ` Martin v. Loewis 2000-04-01 12:10 Giedrius 2000-04-01 12:12 ` Giedrius 2000-03-17 14:11 Bug Report cuse 2000-03-01 14:24 bug report Mike Stump 2000-02-29 13:36 Bug Report Lafferty, Paul 2000-02-25 12:58 bug report Matt Danish 2000-02-24 13:53 Bug Report root 2000-02-21 7:33 bug report Erich G. Roth [not found] <000301bf77e3$7abc3720$f6fa10ac@ftt.net> 2000-02-15 10:55 ` Bug Report Alexandre Oliva 2000-02-12 23:47 Bug report Amit Prakash [not found] <Pine.SGI.4.05.10002101317370.26951065-101000@jhunix.hcf.jhu.edu> 2000-02-11 0:32 ` Bug Report Martin v. Loewis 2000-02-01 6:38 Erin Mcgarrity 2000-02-01 0:31 Bug report Chan Shih-Ping Richard [not found] <00012423074302.00593@wintermute.darkstar.org> 2000-01-24 15:07 ` Martin v. Loewis [not found] <388107F6.F90DBD65@t-online.de> 2000-01-15 17:07 ` bug report Zack Weinberg [not found] <Pine.LNX.3.96.1000111134305.4570A-100000@pignoletto.students.cs.unibo.it> 2000-01-11 13:46 ` Martin v. Loewis 2000-01-05 13:32 Joao Belo 1999-12-31 20:54 mattryan 1999-12-31 20:54 ` Martin v. Loewis 1999-12-31 20:54 Bug report Alexey Zverovich 1999-12-31 20:54 bug report Cristi Vlasceanu 1999-12-31 20:54 ` Nathan Sidwell 1999-12-31 20:54 Cryptic Mind 1999-12-31 20:54 ` Martin v. Loewis 1999-12-31 20:54 Bug Report Mikhail G. Kourinny 1999-12-08 21:11 bug report Bobby Corbell 1999-12-09 3:15 ` Alexandre Oliva 1999-11-30 23:39 OHIRA, Shinya 1999-11-30 23:39 ` Martin v. Loewis 1999-11-30 23:39 Bug report root 1999-11-30 23:39 Felipe Zipitria 1999-11-30 23:39 bug report OHIRA, Shinya [not found] <3825244F.A9B5E56@ipom.com> 1999-11-30 23:39 ` Bug Report Alexandre Oliva 1999-11-18 1:12 Nadezhda I. Viyukova 1999-11-04 14:26 Bug report Martin v. Loewis 1999-11-04 11:24 Zimler Attila 1999-11-04 14:13 ` Martin v. Loewis 1999-10-31 23:03 BUG REPORT Aaron Johnson [not found] <Pine.LNX.4.10.9910101530170.3942-100000@ellipse.underworld.net> 1999-10-31 23:03 ` bug report Martin v. Loewis 1999-10-31 23:03 Tom McLintock 1999-10-31 23:03 Bug report Philippe Bouchard 1999-10-31 23:03 ` Martin v. Loewis 1999-10-31 23:03 BUG REPORT Aaron Johnson 1999-10-31 23:03 ` Martin v. Loewis 1999-10-31 23:03 ` Gerald Pfeifer 1999-10-31 23:03 Bug report Zlatko Rek 1999-11-04 13:16 ` Alexandre Oliva 1999-10-31 23:03 jsmith 1999-10-31 23:03 ` Alexandre Oliva 1999-10-31 23:03 Philippe Bouchard 1999-10-31 23:03 ` Nathan Sidwell 1999-10-31 23:03 ` Martin v. Loewis 1999-10-31 23:03 Philippe Bouchard 1999-10-28 12:37 ` Alexandre Oliva 1999-10-30 16:42 Simon Levy 1999-10-31 23:03 ` Alexandre Oliva 1999-10-28 21:07 Dr Tim Cooper 1999-10-29 1:17 ` Nathan Sidwell 1999-10-31 23:03 ` Martin v. Loewis [not found] <Pine.SGI.4.05.9910250018500.4361872-100000@cse.unl.edu> 1999-10-24 22:32 ` Alexandre Oliva 1999-10-23 22:29 Philippe Bouchard 1999-10-10 12:51 bug report N8TM 1999-10-01 11:11 Bug Report Chunsheng Yang 1999-10-01 12:28 ` Gerald Pfeifer [not found] <199909061624.JAA24041@cygnus.com> 1999-09-30 19:57 ` Bug report Donovan Rebbechi 1999-09-30 19:57 ` Alexandre Oliva 1999-09-30 19:57 ` Donovan Rebbechi 1999-09-30 19:57 Zipi Fligelman 1999-09-30 19:57 Mads Johan Jurik 1999-09-30 19:57 Philippe Bouchard 1999-09-30 19:57 ` Martin v. Loewis 1999-09-27 1:06 bug report erik 1999-09-27 13:11 ` Alexandre Oliva [not found] <37EE4E39.DA691C9F@lionking.org> 1999-09-26 12:39 ` Bug report Alexandre Oliva 1999-09-23 14:51 Simon Berry 1999-09-16 17:52 Philippe Bouchard 1999-09-18 4:50 ` Martin v. Loewis 1999-09-14 2:31 bug report Anthony Appleyard 1999-09-14 4:55 ` Andris Pavenis 1999-08-31 22:45 Bug report Martin Hansen 1999-08-31 22:45 bug report David Hansen 1999-08-31 22:45 Brian W. Harris 1999-08-31 22:45 ` Martin v. Loewis 1999-08-31 22:45 Al Miller 1999-08-31 22:45 Bug report Philippe Bouchard [not found] <199908091620.MAA01096@abel.math.harvard.edu> 1999-08-31 22:45 ` bug report Martin v. Loewis 1999-08-24 2:23 Bug report Martin Hansen 1999-08-20 11:23 Jan Reimers 1999-08-09 2:22 Bug Report Robin Patenall 1999-08-31 22:45 ` Martin v. Loewis 1999-08-01 23:01 bug report Cynthia Dale 1999-08-02 1:50 ` Martin v. Loewis 1999-07-31 23:33 Mike Stump 1999-07-31 23:33 Eric Freudenthal 1999-07-19 14:16 ` Martin v. Loewis 1999-07-31 23:33 Bug report Luigi Palopoli 1999-07-31 23:33 ` Alexandre Oliva 1999-07-31 23:33 bug report jaffe 1999-07-31 23:33 Bug Report Manuel Fierlbeck 1999-07-31 23:33 ` Martin v. Loewis 1999-07-23 10:38 bug report Nicolas brunel 1999-07-25 1:31 ` Martin v. Loewis 1999-07-06 21:50 Christopher 1999-07-13 3:07 ` Alexandre Oliva 1999-07-06 7:53 Manfred Maennle 1999-07-06 13:05 ` Alexandre Oliva 1999-10-19 2:30 ` Jeffrey A Law 1999-07-03 21:49 BUG REPORT Paulo da Silva 1999-07-31 23:33 ` Martin v. Loewis 1999-06-30 23:07 bug report Joao Belo 1999-06-11 15:04 ` Martin v. Loewis 1999-06-30 23:07 Jim Brown 1999-06-30 23:07 ` Martin v. Loewis 1999-06-30 23:07 Kretschel Klaus 1999-06-01 8:25 ` Alexandre Oliva 1999-06-01 8:49 ` Jeffrey A Law 1999-06-01 9:04 ` Richard Earnshaw 1999-06-30 23:07 Vladimir V. Zolotych 1999-06-22 22:30 Bug report Keith Chayer 1999-06-22 22:57 ` Alexandre Oliva 1999-06-18 1:05 bug report Yves Renard 1999-06-18 15:39 ` Alexandre Oliva 1999-06-17 7:52 Bug report Sean McAfee [not found] <3.0.6.32.19990614202913.0086ae10@blomand.net> 1999-06-14 21:13 ` Alexandre Oliva 1999-05-31 21:06 Alex Charalabidis 1999-05-31 21:06 bug report holger 1999-05-31 21:06 ` Martin v. Loewis 1999-05-10 23:43 Bug Report Briggs, James 1999-05-31 21:06 ` Martin v. Loewis 1999-05-08 15:37 Curt Doernberg 1999-04-30 23:15 bug report Ben Collver 1999-04-30 23:15 Ralf Kollmann 1999-04-30 23:15 Ralf Kollmann 1999-04-09 11:38 ` Alexandre Oliva 1999-04-16 12:01 Peter Yuen 1999-04-30 23:15 ` Martin v. Loewis 1999-04-13 12:10 Bug Report Alex Zimmerman 1999-04-01 14:12 bug report Christian Wichert 1999-04-30 23:15 ` Alexandre Oliva 1999-04-30 23:15 ` Christian Wichert 1999-03-31 23:54 Bug Report Matt Hoppes 1999-03-31 23:54 ` Alexandre Oliva 1999-03-31 23:54 Bug report Morten Nicolaj Pedersen 1999-03-31 23:54 Igor Seleznev [not found] ` < Pine.LNX.4.10.9903021526420.31990-300000@barad.tme.mcst.ru > 1999-03-03 9:29 ` Martin v. Loewis 1999-03-31 23:54 Bug Report Holger Buchholz 1999-03-31 23:54 Betty Li 1999-05-31 21:06 ` Martin v. Loewis 1999-03-31 3:14 bug report Dirk Pesch 1999-03-31 23:54 ` Nathan Sidwell 1999-03-23 8:42 Anders Sanne 1999-03-23 23:06 ` Alexandre Oliva 1999-02-28 23:30 Nemat Rakhmatov 1999-02-28 23:30 Bug Report Myke Morgan 1999-02-28 23:30 ` Martin v. Loewis 1999-02-28 23:30 Bug report Mike Stump 1999-02-28 23:30 David Emile Lamy 1999-02-28 23:30 ` Alexandre Oliva [not found] ` < orhfs8flkp.fsf@araguaia.dcc.unicamp.br > 1999-02-27 1:50 ` David Emile Lamy 1999-02-28 23:30 ` Alexandre Oliva 1999-02-28 23:30 Xianglong Huang 1999-02-16 16:42 ` Alexandre Oliva 1999-02-28 23:30 Nir Arbel 1999-02-28 23:30 ` Martin v. Loewis 1999-02-17 1:55 bug report Maarten Huisjes 1999-02-08 8:44 Bug report David Pollack 1999-02-03 16:21 Bug Report Darren Pearce 1999-01-29 18:05 bug report Eugene Koontz 1999-01-30 2:26 ` Martin v. Loewis 1999-01-25 6:49 Bug Report Tom.Lake 1999-01-21 1:19 bug report Johan Cockx 1999-01-18 21:34 Qiyan Li 1999-01-18 1:48 Nemat Rakhmatov [not found] <364B502A.563972DE@mail.dotcom.fr> 1999-01-17 21:08 ` Jeffrey A Law 1999-01-17 6:34 NassÃn Lars 1999-01-15 3:07 Bug Report Bernhard van Bonn 1999-01-16 14:35 ` Alexandre Oliva 1999-01-14 19:36 bug report Thomas G. Dietterich 1999-01-08 2:22 Bug report Dale Gerdemann 1999-01-08 15:08 ` Martin v. Loewis 1999-01-04 6:59 bug report James Briggs 1998-12-19 8:27 BUG report Joachim Falk 1998-12-10 12:43 Bug report Karl JH Millar 1998-12-10 15:55 ` Alexandre Oliva 1998-11-30 13:07 Karlheinz Langguth 1998-11-24 7:54 Christian Gavin 1998-11-23 14:45 bug report Mike Stump 1998-11-23 4:02 Klaus-Georg Adams 1998-11-16 10:10 Michael Henderson 1998-11-13 21:21 G Sudhakar BTech EE 1998-11-12 23:12 Corrado Zoccolo 1998-11-06 15:37 Bug Report Joshua Longley 1998-11-06 10:35 bug report Neil D. Howie 1998-12-05 23:40 ` Alexandre Oliva 1998-11-04 14:52 Bug Report Mike Stump 1998-10-28 11:58 bug report Antoine Pitrou 1998-10-24 17:57 Bug report Jim Peterson 1998-10-23 15:05 bug report Marc Pickett I 1998-10-26 18:01 ` Alexandre Oliva 1998-10-23 14:11 root 1998-10-26 18:00 ` Alexandre Oliva 1998-10-22 8:55 Bug Report Ute Spinczyk 1998-10-12 6:30 Bug report Simon A. Crase 1998-10-12 9:35 ` Alexandre Oliva 1998-10-09 19:36 bug report scott 1998-10-09 15:11 Bug report Pieter van Beek 1998-10-09 22:49 ` Alexandre Oliva 1998-10-05 12:37 bug report P. O. Fedichev 1998-10-05 23:29 ` Alexandre Oliva 1998-09-30 21:27 Bug Report Steven M. Gallo 1998-09-29 6:53 Bug report Eric Dumazet 1998-09-29 13:10 ` Alexandre Oliva 1998-09-28 11:29 bug report Sang Kang 1998-09-28 17:22 ` Alexandre Oliva 1998-09-20 1:15 Bug Report Francisco Xavier Ari~o 1998-09-20 5:26 ` Alexandre Oliva 1998-09-17 19:44 BUG REPORT Deirdre Saoirse 1998-09-14 21:16 Bug report Greg Chicares 1998-09-15 17:17 ` Alexandre Oliva 1998-09-14 21:16 Greg Chicares 1998-09-15 17:41 ` Alexandre Oliva 1998-09-08 9:01 Alexandrescu, Andrei 1998-09-08 16:10 ` Martin von Loewis 1998-09-09 7:50 ` Todd Vierling 1998-08-23 19:40 bug report Jim Kelley 1998-08-23 23:41 ` Alexandre Oliva 1998-08-24 16:07 ` Martin von Loewis 1998-08-21 3:05 Speed 1998-08-21 11:04 ` Martin von Loewis 1998-08-21 11:25 ` Alexandre Oliva 1998-08-21 23:58 ` Martin von Loewis 1998-08-22 19:49 ` Jeffrey A Law 1998-08-17 14:41 Bug Report Rene Scholz 1998-08-07 8:52 bug report Gabriel J. Ferrer 1998-07-25 15:09 Bug Report Michael Niehren 1998-07-22 7:29 bug report Stefan Thieme 1998-07-08 3:36 Bug Report Jonathan Storey 1998-07-08 12:43 ` Martin von Loewis 1998-07-06 12:15 bug report Ken Smith 1998-07-05 3:29 Bug report Antonello Biancalana 1998-07-03 3:12 Gabriel B Burca 1998-05-31 9:54 bug report Mathieu Dutour 1998-05-31 11:54 ` Martin von Loewis 1998-05-04 18:59 Bug report Paul Tomblin 1998-05-04 20:16 ` Paul Tomblin 1998-04-30 20:13 bug report David R Bacon 1998-05-03 8:26 ` Gerald Pfeifer 1998-04-15 23:21 Bug report Adam Huffman 1998-04-15 16:12 Bug Report B. James Phillippe 1998-04-11 9:05 Jeremy S. Wozny 1998-04-07 12:32 bug report Igor Levko 1998-04-09 7:12 ` Gerald Pfeifer 1998-03-17 23:33 Bug report William J. Fellows 1998-03-07 22:56 bug report sl 1998-02-26 7:30 Bug Report Petter Urkedal 1998-02-12 15:19 bug report Mathieu Dutour 1998-02-12 18:25 ` Mark Mitchell 1998-01-31 18:54 Jimen Ching 1998-01-12 14:49 Bug Report Joseph Sirosh 1997-09-07 8:41 bug report Oleg Krivosheev 1997-09-07 9:37 ` Mark Mitchell
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=199811202324.AAA00544@mira.isdn.cs.tu-berlin.de \ --to=martin@mira.isdn.cs.tu-berlin.de \ --cc=egcs-bugs@cygnus.com \ --cc=leemich@ms.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).