public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/5019: ICE on templated friends
@ 2001-12-05  9:36 isabelle.hurbain
  0 siblings, 0 replies; 5+ messages in thread
From: isabelle.hurbain @ 2001-12-05  9:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5019
>Category:       c++
>Synopsis:       ICE on templated friends
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 05 09:36:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     isabelle.hurbain@free.fr
>Release:        unknown-1.0
>Organization:
>Environment:
Tested on
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
gcc version 2.95.3 20010315 (SuSE)
and on
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specs
gcc version 2.95.2 19991024 (release)
>Description:
When compiling driver.cpp, ICE - g++ doesn't seem to like things like
template<class another, unsigned int M>
    friend amatrix<another, M>;

(even if ugly.... I think the syntax is valid...)
>How-To-Repeat:
g++ -o driver driver.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-gzip; name="bug_report.tar.gz"; name="bug_report.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug_report.tar.gz"

H4sICG1ZDjwAA2J1Z19yZXBvcnQudGFyAO1Y227iSBDN6/orSkTKmsswtjEZDTdpHiJlHsgD2oeR
IhQ5uIHmYqO2PbvaUf59q30hvhKSCcnubB0RiN3V1VWH6mpzrK3lC/5Xe3l2OuiadmmacAbQ0YyO
/ISOYYSfEp807RO+m1rHNM2ubgDoerdjnoF2wpj2CDzfEgBnfBmIe4s7VXZz/vnzW8Tzxjjnc8dm
c/gy/vLH5Ou3u2vlHC+5w1J3lHPuzDaBzWDAXc8XzNqOFCXwuLMAz7d7vfhmP32POfYmc2PmBn5f
UXy23W0snw1mG8v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/0n1AJ1
/fKS9J83wV7aqe2VwJqiyAa0RTLUzElju8H9hrVMPEN1Vdfb0VEidR3Z5rZ6utklc7hsRnKGAaqR
tTfS9ng1BKOtNba6vPzYiB6kS22Tuyou2cSxeulgJ3RWh7Ko4kzCwDqgmpFpJrqOvGp8xJ9iD9Qd
CQQCgUAgEAgEAoFAIBAI/1WQ/kv6L+m/pP8SCAQCgUAgEAgEAoFA+HXxD22d/akAUAAA


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

* Re: c++/5019: ICE on templated friends
@ 2001-12-05 20:56 rodrigc
  0 siblings, 0 replies; 5+ messages in thread
From: rodrigc @ 2001-12-05 20:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: rodrigc@gcc.gnu.org
To: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
  isabelle.hurbain@free.fr, nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/5019: ICE on templated friends
Date: 6 Dec 2001 04:45:42 -0000

 Synopsis: ICE on templated friends
 
 State-Changed-From-To: feedback->closed
 State-Changed-By: rodrigc
 State-Changed-When: Wed Dec  5 20:45:42 2001
 State-Changed-Why:
     gcc 3.0.3 doesn't ICE.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=5019&database=gcc


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

* Re: c++/5019: ICE on templated friends
@ 2001-12-05 20:46 rodrigc
  0 siblings, 0 replies; 5+ messages in thread
From: rodrigc @ 2001-12-05 20:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: rodrigc@gcc.gnu.org
To: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
  isabelle.hurbain@free.fr, nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/5019: ICE on templated friends
Date: 6 Dec 2001 04:44:42 -0000

 Synopsis: ICE on templated friends
 
 State-Changed-From-To: open->feedback
 State-Changed-By: rodrigc
 State-Changed-When: Wed Dec  5 20:44:42 2001
 State-Changed-Why:
     I don't think this code is legal.
     
     gcc 3.0.3 does not ICE on this code, but issues the following
     compilation errors:
     
     In file included from driver.cpp:1:
     amatrix.h:13: friend declaration requires class-key, i.e. `friend class
        amatrix<another, M>'
     amatrix.h: In constructor `amatrix<t_element, N>::amatrix(const
        amatrix<another, M>&) [with another = double, unsigned int M = 4, t_element
        = int, unsigned int N = 4]':
     driver.cpp:8:   instantiated from here
     amatrix.h:15: `double amatrix<double, 4>::m_data[4][4]' is private
     amatrix.h:46: within this context
     amatrix.h:49: `cerr' undeclared (first use this function)
     amatrix.h:49: (Each undeclared identifier is reported only once for each
        function it appears in.)
     
     
     Compiling with the Digital Unix C++ compiler
     yielded the following compilation error:
     
     cxx: Error: amatrix.h, line 13: expected an identifier
         friend amatrix<another, M>;
     
     
     So this code is questionable.  Since gcc 3.0.3 does not
     ICE on this code, I am closing this PR.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=5019&database=gcc


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

* Re: c++/5019: ICE on templated friends
@ 2001-12-05 20:45 rodrigc
  0 siblings, 0 replies; 5+ messages in thread
From: rodrigc @ 2001-12-05 20:45 UTC (permalink / raw)
  To: gcc-bugs, gcc-gnats, gcc-prs, isabelle.hurbain, nobody

Synopsis: ICE on templated friends

State-Changed-From-To: feedback->closed
State-Changed-By: rodrigc
State-Changed-When: Wed Dec  5 20:45:42 2001
State-Changed-Why:
    gcc 3.0.3 doesn't ICE.

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


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

* Re: c++/5019: ICE on templated friends
@ 2001-12-05 20:44 rodrigc
  0 siblings, 0 replies; 5+ messages in thread
From: rodrigc @ 2001-12-05 20:44 UTC (permalink / raw)
  To: gcc-bugs, gcc-gnats, gcc-prs, isabelle.hurbain, nobody

Synopsis: ICE on templated friends

State-Changed-From-To: open->feedback
State-Changed-By: rodrigc
State-Changed-When: Wed Dec  5 20:44:42 2001
State-Changed-Why:
    I don't think this code is legal.
    
    gcc 3.0.3 does not ICE on this code, but issues the following
    compilation errors:
    
    In file included from driver.cpp:1:
    amatrix.h:13: friend declaration requires class-key, i.e. `friend class
       amatrix<another, M>'
    amatrix.h: In constructor `amatrix<t_element, N>::amatrix(const
       amatrix<another, M>&) [with another = double, unsigned int M = 4, t_element
       = int, unsigned int N = 4]':
    driver.cpp:8:   instantiated from here
    amatrix.h:15: `double amatrix<double, 4>::m_data[4][4]' is private
    amatrix.h:46: within this context
    amatrix.h:49: `cerr' undeclared (first use this function)
    amatrix.h:49: (Each undeclared identifier is reported only once for each
       function it appears in.)
    
    
    Compiling with the Digital Unix C++ compiler
    yielded the following compilation error:
    
    cxx: Error: amatrix.h, line 13: expected an identifier
        friend amatrix<another, M>;
    
    
    So this code is questionable.  Since gcc 3.0.3 does not
    ICE on this code, I am closing this PR.

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


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

end of thread, other threads:[~2001-12-06  4:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-05  9:36 c++/5019: ICE on templated friends isabelle.hurbain
2001-12-05 20:44 rodrigc
2001-12-05 20:45 rodrigc
2001-12-05 20:46 rodrigc
2001-12-05 20:56 rodrigc

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