public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9256: C++ compiler conformance to Standard proposal 337
@ 2003-01-09 23:36 pavel_vozenilek
  0 siblings, 0 replies; 2+ messages in thread
From: pavel_vozenilek @ 2003-01-09 23:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9256
>Category:       c++
>Synopsis:       C++ compiler conformance to Standard proposal 337
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 09 15:36:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Pavel Vozenilek
>Release:        unknown-1.0
>Organization:
>Environment:

>Description:
The proposal is on page: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_active.html#337. Its state is 'ready'.

Comeau 3, VC 7.1beta and Intel C++ 7.0 already support this feature.

It may be used e.g. to implement is_abstract_class<> as in http://groups.google.com/groups?q=is_abstract_class+group:comp.lang.c%2B%2B.moderated&hl=en&lr=&ie=UTF-8&selm=df893da6.0207110613.75b2fe90%40posting.google.com&rnum=1


>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

* Re: c++/9256: C++ compiler conformance to Standard proposal 337
@ 2003-01-10  1:02 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-01-10  1:02 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, pavel_vozenilek

Synopsis: C++ compiler conformance to Standard proposal 337

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu Jan  9 17:02:29 2003
State-Changed-Why:
    Confirmed. A simple testcase is that this must not compile:
    ------------------------
    struct Abstract {
        virtual void f() = 0;
    };
    
    Abstract (*a)[2];
    --------------------------
    
    A more complicated that this should succeed at run-time:
    --------------------------
    #include <cassert>
    
    // must match all non-abstract types (except U=void, U a reference, etc)
    template<typename U>
    int check(U (*)[1]) { return 1;};
    
    // worst case match for everything else
    template<typename U>
    int check(...)      { return 2;};
    
    struct Abstract {
        virtual void f() = 0;
    };
    
    
    int main () 
    {
      assert (check<int> (0) == 1);
      assert (check<Abstract> (0) == 2);
    };
    --------------------------
    
    gcc3.4 is wrong on both testcases.
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9256


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

end of thread, other threads:[~2003-01-10  1:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-09 23:36 c++/9256: C++ compiler conformance to Standard proposal 337 pavel_vozenilek
2003-01-10  1:02 bangerth

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