Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 4137
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: benko@sztaki.hu
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 4137 depends on: Show dependency tree
Show dependency graph
Bug 4137 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2001-08-27 07:06
I do not know whether this is a bug in the compiler or
illegal code.
The following program does not compile:



template <typename c>
struct a
{
  typedef int b;
  
  operator b();
};

template <typename c>
a<c>::operator typename a<c>::b() // omitting `typename'
                                  // makes no difference
{
  return 0;
}



Workaround:



template <typename c>
struct a
{
  typedef int b;
  
  operator b() {return 0;}
};



Without templates there is no problem:


struct a
{
  typedef int b;
  
  operator b();
};

a::operator a::b()
{
  return 0;
}

Release:
3.0.1

Environment:
SuSE 7.1

------- Comment #1 From Nathan Sidwell 2002-02-26 14:16 -------
State-Changed-From-To: open->analyzed
State-Changed-Why: confirmed

------- Comment #2 From Paolo Carlini 2003-01-02 13:33 -------
State-Changed-From-To: analyzed->closed
State-Changed-Why: Already fixed for 3.3 and 3.4.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug