public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7176: g++ confused by friend and static member with same name
@ 2002-08-03  8:06 Raoul Gough
  0 siblings, 0 replies; 5+ messages in thread
From: Raoul Gough @ 2002-08-03  8:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: "Raoul Gough" <RaoulGough@yahoo.co.uk>
To: <gcc-gnats@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>,
	<gcc-bugs@gcc.gnu.org>,
	<nobody@gcc.gnu.org>,
	<nmusatti@comm2000.it>
Cc:  
Subject: Re: c++/7176: g++ confused by friend and static member with same name
Date: Sat, 3 Aug 2002 16:04:12 +0100

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
 r=7176
 
 Is this PR related to (or the same) as the following much simpler compile
 problem?
 
 typedef int foo;
 
 struct bar {
   foo foo;
 };
 
 $ f:/mingw/bin/g++ -c typename_reuse.cc
 typename_reuse.cc:4: declaration of `foo bar::foo'
 typename_reuse.cc:1: changes meaning of `foo' from `typedef int foo'
 
 BTW, I don't write code like that myself - it's representative of some code
 in the Microsoft DirectX samples.
 
 Regards,
 Raoul Gough.
 
 __________________________________________________
 Do You Yahoo!?
 Everything you'll ever need on one web page
 from News and Sport to Email and Music Charts
 http://uk.my.yahoo.com


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

* Re: c++/7176: g++ confused by friend and static member with same name
@ 2002-10-14  0:49 mmitchel
  0 siblings, 0 replies; 5+ messages in thread
From: mmitchel @ 2002-10-14  0:49 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nmusatti, nobody

Synopsis: g++ confused by friend and static member with same name

State-Changed-From-To: analyzed->closed
State-Changed-By: mmitchel
State-Changed-When: Mon Oct 14 00:49:04 2002
State-Changed-Why:
    Fixed in GCC 3.2.1.

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


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

* Re: c++/7176: g++ confused by friend and static member with same name
@ 2002-10-08 14:44 gdr
  0 siblings, 0 replies; 5+ messages in thread
From: gdr @ 2002-10-08 14:44 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nmusatti, nobody

Synopsis: g++ confused by friend and static member with same name

State-Changed-From-To: open->analyzed
State-Changed-By: gdr
State-Changed-When: Tue Oct  8 14:44:26 2002
State-Changed-Why:
    Confirmed.  A regression from 2.95

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


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

* Re: c++/7176: g++ confused by friend and static member with same name
@ 2002-08-15  0:06 Nicola Musatti
  0 siblings, 0 replies; 5+ messages in thread
From: Nicola Musatti @ 2002-08-15  0:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Nicola Musatti <nmusatti@comm2000.it>
To: Raoul Gough <RaoulGough@yahoo.co.uk>
Cc: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
   nobody@gcc.gnu.org
Subject: Re: c++/7176: g++ confused by friend and static member with same name
Date: Wed, 14 Aug 2002 08:26:13 +0200

 Sorry for the delay in answering.
 
 Raoul Gough wrote:
 > 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
 > r=7176
 > 
 > Is this PR related to (or the same) as the following much simpler compile
 > problem?
 > 
 > typedef int foo;
 > 
 > struct bar {
 >   foo foo;
 > };
 > 
 > $ f:/mingw/bin/g++ -c typename_reuse.cc
 > typename_reuse.cc:4: declaration of `foo bar::foo'
 > typename_reuse.cc:1: changes meaning of `foo' from `typedef int foo'
 
 This has many similarities with the problem I submitted, but I don't
 know enough about language details or the compiler to venture an
 opinion.
 
 Cheers,
 Nicola Musatti
 


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

* c++/7176: g++ confused by friend and static member with same name
@ 2002-07-01  4:56 nmusatti
  0 siblings, 0 replies; 5+ messages in thread
From: nmusatti @ 2002-07-01  4:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7176
>Category:       c++
>Synopsis:       g++ confused by friend and static member with same name
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 01 04:56:03 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     nmusatti@comm2000.it
>Release:        GNU C++ version 3.1 (i686-pc-cygwin)
>Organization:
>Environment:

>Description:
The following preprocessed source should compile without errors, but doesn't:

# 1 "DateTimeNS.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "DateTimeNS.cpp"
namespace Test {

template <typename Result, typename Value> inline Result convert(Value v) {
    return Result(v);
}

class DateTime {
    friend DateTime Test::convert<DateTime,long>(long);
    static long convert(const long double & v);
};

template <> inline DateTime convert<DateTime,long>(long v) {
        return DateTime();
}

long DateTime::convert(const long double & v) {
        return long(v);
}

}

The error messages are:
DateTimeNS.cpp:9: declaration of `static long int Test::DateTime::convert(const
   long double&)'
DateTimeNS.cpp:3: changes meaning of `convert' from `Result
   Test::convert(Value)'
>How-To-Repeat:
Save the attached code without the first four lines in a source
file, say a.cpp; run
g++ -c a.cpp
>Fix:

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


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

end of thread, other threads:[~2002-10-14  7:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-03  8:06 c++/7176: g++ confused by friend and static member with same name Raoul Gough
  -- strict thread matches above, loose matches on Subject: below --
2002-10-14  0:49 mmitchel
2002-10-08 14:44 gdr
2002-08-15  0:06 Nicola Musatti
2002-07-01  4:56 nmusatti

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