c++/9459: typeof in return type specification of template not supported

bangerth@ticam.utexas.edu bangerth@ticam.utexas.edu
Mon Jan 27 17:08:00 GMT 2003


>Number:         9459
>Category:       c++
>Synopsis:       typeof in return type specification of template not supported
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 27 16:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Wolfgang Bangerth
>Release:        unknown-1.0
>Organization:
>Environment:
all versions of gcc until present 3.4 CVS
>Description:
This has never worked in C++ (2.95 ICEs, more recent version
just fail, see below):
----------------------------
void foo (int) {}
void foo (double) {}


template <typename C>
typeof(foo(1))
bar () { return foo(1); }
----------------------------

g/a> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c bug34-4.cc
bug34-4.cc:7: sorry, unimplemented: `typeof_type' not supported by
   dump_type_prefix
bug34-4.cc:7: sorry, unimplemented: `typeof_type' not supported by
   dump_type_suffix


While typeof is a gcc extension, it is a very valuable
one, and in this particular instance, cannot even be
replaced by template magic, as far as I know...

W.
>How-To-Repeat:

>Fix:

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



More information about the Gcc-bugs mailing list