This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11756] New: ICE's when using typeof in template function parameter type declarations


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11756

           Summary: ICE's when using typeof in template function parameter
                    type declarations
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gccbugs at contacts dot eelis dot net
                CC: gcc-bugs at gcc dot gnu dot org

The following code triggers an ICE in write_type, at cp/mangle.c:1517 (line 1473
in gcc 3.2.3):

  struct S { void f (); };
  template <typename T> int g (typeof(&T::f));
  int const i = g<S>(0);

The following related simpler but illegal code triggers an ICE in
cp_parser_template_id, at cp/parser.c:7515 :

  template <typename T> int h (typeof(&T));
  int const j = h<int>(0);

I'm using gcc version 3.4 20030723.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]