public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/10481: Invalid use of non-static data member causes ICE.
@ 2003-04-24 13:46 Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2003-04-24 13:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/10481; it has been noted by GNATS.

From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, redi@gcc.gnu.org,
	nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org
Cc:  
Subject: Re: c++/10481: Invalid use of non-static data member causes ICE.
Date: Thu, 24 Apr 2003 14:40:15 +0100

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10481
 
 This is a regression since 3.2.1, which gave the following diagnostic
 for B::f():
 
 ice.cc: In member function `void B::f(const A&) const':
 ice.cc:18: type `A' is not a base type for type `B'
 
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c++/10481: Invalid use of non-static data member causes ICE.
@ 2003-04-24 13:16 redi
  0 siblings, 0 replies; 2+ messages in thread
From: redi @ 2003-04-24 13:16 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10481
>Category:       c++
>Synopsis:       Invalid use of non-static data member causes ICE.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 24 13:16:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Wakely
>Release:        3.4 20030422 (experimental)
>Organization:
>Environment:
System: FreeBSD buffy.mintel.co.uk 4.8-RC-20030314-JPSNAP FreeBSD 4.8-RC-20030314-JPSNAP #0: Mon Mar 17 13:41:48 GMT 2003 jason@buffy.mintel.co.uk:/usr/src/sys/compile/BUFFY i386


	
host: i386-unknown-freebsd4.8
build: i386-unknown-freebsd4.8
target: i386-unknown-freebsd4.8
configured with: /home/jw/src/cvs/gcc/configure --prefix=/home/jw --program-prefix=x --enable-languages=c,c++ : (reconfigured) /home/jw/src/cvs/gcc/configure --prefix=/home/jw/gcc33/ --enable-languages=c,c++ : (reconfigured) /home/jw/src/cvs/gcc/configure --prefix=/home/jw/gcc3/ --enable-languages=c,c++
>Description:

If you compile the code below the first error in function f() correctly
issues a diagnostic about invalid use of a non-static data member, but the
second function, B::f() causes an ICE. The only difference is that one
function is a class member.

>How-To-Repeat:

struct A
{
    char a;
};

struct B
{
    void f(const A&) const;
};

void f(const A& a)
{
    unsigned s = sizeof(A::a);  // ERROR -> diagnostic
}

void B::f(const A& a) const
{
    unsigned s = sizeof(A::a);  // ERROR -> ICE
}


>Fix:
	Don't write bad code.
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-24 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-24 13:46 c++/10481: Invalid use of non-static data member causes ICE Jonathan Wakely
  -- strict thread matches above, loose matches on Subject: below --
2003-04-24 13:16 redi

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).