public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "crowl at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/27177] [4.0/4.1/4.2/4.3 Regression] ICE in build_simple_base_path, at cp/class.c:474
Date: Wed, 02 May 2007 01:24:00 -0000	[thread overview]
Message-ID: <20070502012421.20060.qmail@sourceware.org> (raw)
In-Reply-To: <bug-27177-12540@http.gcc.gnu.org/bugzilla/>



------- Comment #12 from crowl at google dot com  2007-05-02 02:24 -------
(In reply to comment #10)
> I am not convinced that the code in Comment #8 is valid.
> 
> Although the operand of sizeof is not in fact evaluated, it seems odd to
> permit an operand which cannot, even in principle, be evaluated.  This is
> not even a case in which evaluating the operand would lead to undefined
> behavior; there is simply no way to evaluate the operand at all.  If there
> is an implicit conversion from B* to Z* at this point, then we must know
> how to perform the conversion, but we cannot, since B is not complete.

While that view has merit, I find no requirement in the standard that
requires a complete class.  Setting that aside s possibly unreasonable,
I think 4.10 paragraph 3 "The null pointer value is converted to the null
pointer value of the destination type." enables conversion of null pointers
when the pointer type has known bases but is not yet complete.

> Are you arguing that in:
> 
>   struct B {};
>   struct D : public B {                                      
>     static const int i = sizeof((B*)(D*)0);                  
>   };
> 
> the conversion from D* to B* is a static_cast?

I think (B*)(D*)0 is a conversion under 4.10.

> Has anyone asked about this case on the core reflector?

Would you like me to?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27177


  parent reply	other threads:[~2007-05-02  1:24 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-16  9:30 [Bug c++/27177] New: " nashpaulr at gmail dot com
2006-04-16  9:32 ` [Bug c++/27177] " nashpaulr at gmail dot com
2006-04-16  9:34 ` nashpaulr at gmail dot com
2006-04-16 23:13 ` [Bug c++/27177] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-06-02 22:39 ` reichelt at gcc dot gnu dot org
2006-06-04 18:27 ` mmitchel at gcc dot gnu dot org
2006-06-05 23:05 ` mmitchel at gcc dot gnu dot org
2006-06-06 21:39 ` mmitchel at gcc dot gnu dot org
2006-06-06 21:42 ` mmitchel at gcc dot gnu dot org
2006-06-06 21:55 ` [Bug c++/27177] [4.0 " mmitchel at gcc dot gnu dot org
2006-08-18 11:21 ` zak at transversal dot com
2006-09-09  3:17 ` [Bug c++/27177] [4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
2006-09-10 21:56 ` mmitchel at gcc dot gnu dot org
2006-09-10 22:04 ` mmitchel at gcc dot gnu dot org
2007-02-03 16:51 ` [Bug c++/27177] [4.0/4.1/4.2/4.3 " gdr at gcc dot gnu dot org
2007-02-03 20:29 ` pinskia at gcc dot gnu dot org
2007-02-14  9:07 ` mmitchel at gcc dot gnu dot org
2007-05-02  1:24 ` crowl at google dot com [this message]
2007-05-02 19:02 ` mark at codesourcery dot com
2007-12-16 23:21 ` steven at gcc dot gnu dot org
2007-12-18  5:38 ` mmitchel at gcc dot gnu dot org
2008-01-14 12:06 ` [Bug c++/27177] [4.1/4.2/4.3 " rguenth at gcc dot gnu dot org
2008-01-14 22:29 ` crowl at google dot com
2008-01-15 10:11 ` rguenth at gcc dot gnu dot org
2008-01-15 10:34 ` rguenth at gcc dot gnu dot org
2008-01-21  2:23 ` mmitchel at gcc dot gnu dot org
2008-01-21 20:55 ` crowl at google dot com
2008-01-25 16:41 ` rguenth at gcc dot gnu dot org
2008-01-26  1:32 ` jason at gcc dot gnu dot org
2008-01-26  9:42 ` [Bug c++/27177] [4.1/4.2 " jakub at gcc dot gnu dot org
2008-01-26 11:56 ` rguenth at gcc dot gnu dot org
2008-01-26 11:57 ` [Bug c++/27177] [4.1/4.2/4.3 " rguenth at gcc dot gnu dot org
2008-01-26 18:58 ` rguenth at gcc dot gnu dot org
2008-01-26 19:34 ` hjl dot tools at gmail dot com
2008-01-26 19:44 ` rguenth at gcc dot gnu dot org
2008-01-28  8:03 ` jason at gcc dot gnu dot org
2008-01-28  8:10 ` jason at gcc dot gnu dot org
2008-01-28 16:34 ` jason at gcc dot gnu dot org
2008-01-28 16:35 ` jason at gcc dot gnu dot org

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=20070502012421.20060.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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: link
Be 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).