public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/2922: two-phase name lookup not working
@ 2001-05-24 14:46 Martin Sebor
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Sebor @ 2001-05-24 14:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Martin Sebor <sebor@roguewave.com>
To: Jens.Maurer@gmx.net
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/2922: two-phase name lookup not working
Date: Thu, 24 May 2001 15:47:15 -0600

 Jens.Maurer@gmx.net wrote:
 > 
 > >Number:         2922
 > >Category:       c++
 > >Synopsis:       two-phase name lookup not working
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    unassigned
 > >State:          open
 > >Class:          wrong-code
 > >Submitter-Id:   net
 > >Arrival-Date:   Thu May 24 02:06:01 PDT 2001
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Jens Maurer
 > >Release:        gcc version 3.0 20010521 (prerelease)
 > >Organization:
 > >Environment:
 > Linux 2.2.4 with glibc 2.2.3
 > >Description:
 > The program below is supposed to output
 > f(char)
 > f(int)
 > f(char)
 > f(char)
 > 
 > according to 14.6p9.
 
 But take a look at issue 197 at
 
     http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_active.html#197
 
 Not that the issue makes gcc's behavior correct (f(char) should 
 apparently be called in all 4 cases).
 
 Regards
 Martin
 
 > 
 > gcc (all of 2.95.3, pre-3.0, and 3.1 20010518) outputs
 > f(int)
 > f(int)
 > f(int)
 > f(char)
 > >How-To-Repeat:
 > 
 > // example (slightly adapted) from 14.6p9
 > 
 > #include <iostream>
 > 
 > void f(char)
 > {
 >   std::cout << "f(char)" << std::endl;
 > }
 > 
 > template<class T>
 > void g(T t)
 > {
 >   f(1);        // not dependent
 >   f(t);        // dependent
 > }
 > 
 > void f(int)
 > {
 >   std::cout << "f(int)" << std::endl;
 > }
 > 
 > int main()
 > {
 >   g(2);    // f(char) followed by f(int)
 >   g('a');  // two f(char)
 > }
 > 
 > >Fix:
 > 
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:


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

* Re: c++/2922: two-phase name lookup not working
@ 2001-05-24 15:56 Jens Maurer
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Maurer @ 2001-05-24 15:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Jens Maurer <Jens.Maurer@gmx.net>
To: Martin Sebor <sebor@roguewave.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/2922: two-phase name lookup not working
Date: Fri, 25 May 2001 00:44:56 +0200

 Martin Sebor wrote:
 > Jens.Maurer@gmx.net wrote:
 > > The program below is supposed to output
 > > f(char)
 > > f(int)
 > > f(char)
 > > f(char)
 
 You're correct, core issue 197 says it should output "f(char)" in all
 cases.
 
 Jens Maurer
 
 


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

* c++/2922: two-phase name lookup not working
@ 2001-05-24  2:06 Jens.Maurer
  0 siblings, 0 replies; 3+ messages in thread
From: Jens.Maurer @ 2001-05-24  2:06 UTC (permalink / raw)
  To: gcc-gnats

>Number:         2922
>Category:       c++
>Synopsis:       two-phase name lookup not working
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Thu May 24 02:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jens Maurer
>Release:        gcc version 3.0 20010521 (prerelease)
>Organization:
>Environment:
Linux 2.2.4 with glibc 2.2.3
>Description:
The program below is supposed to output
f(char)
f(int)
f(char)
f(char)

according to 14.6p9.

gcc (all of 2.95.3, pre-3.0, and 3.1 20010518) outputs
f(int)
f(int)
f(int)
f(char)
>How-To-Repeat:

// example (slightly adapted) from 14.6p9

#include <iostream>

void f(char)
{
  std::cout << "f(char)" << std::endl;
}

template<class T>
void g(T t)
{
  f(1);        // not dependent
  f(t);        // dependent
}

void f(int)
{
  std::cout << "f(int)" << std::endl;
}

int main()
{
  g(2);    // f(char) followed by f(int)
  g('a');  // two f(char)
}

>Fix:

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


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

end of thread, other threads:[~2001-05-24 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-24 14:46 c++/2922: two-phase name lookup not working Martin Sebor
  -- strict thread matches above, loose matches on Subject: below --
2001-05-24 15:56 Jens Maurer
2001-05-24  2:06 Jens.Maurer

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