public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13561] New: template functions in classes
@ 2004-01-04  8:09 gcc-bugzilla at gcc dot gnu dot org
  2004-01-04  8:15 ` [Bug c++/13561] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-01-04  8:09 UTC (permalink / raw)
  To: gcc-bugs

	gcc rejects enclosed code; template instantiation of function f()
	in function g() produces 'parse error before ;', indepenedently of 
	template paramenter (int, void, T, B, etc). Problem disapperars when
	function g() is renamed to f() (works with all one-latter names, when
	both names are the same). Repeated also on MinGW 3.2, cygwin 3.3.1,
	cygwin 2.95 reports 'parse error before >', or ICEs on more 
	complex code
	(I haven't found nothing similar in ChangLog).
	structs are only to preserve space, class'es with public:'s 
	fail as well. Also with template parameter type 'class' instead of
	'typename'

Environment:
System: SunOS residue.ict.pwr.wroc.pl 5.7 Generic_106541-20 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4

	
host: sparc-sun-solaris2.7
build: sparc-sun-solaris2.7
target: sparc-sun-solaris2.7
configured with: ../configure --with-as=/usr/local/bin/as --with-ld=/usr/local/bin/ld

How-To-Repeat:
                struct A
                {
                        template<typename T> void f() { }
                };

                class B
                {
                        A a;
                        template<typename T> void g() { a.f<int>(); }
                }
------- Additional Comments From pepe at residue dot ict dot pwr dot wroc dot pl  2004-01-04 08:09 -------
Fix:
	I have no idea, besides above :(

-- 
           Summary: template functions in classes
           Product: gcc
           Version: 3.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pepe at residue dot ict dot pwr dot wroc dot pl
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.7
  GCC host triplet: sparc-sun-solaris2.7
GCC target triplet: sparc-sun-solaris2.7


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


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

end of thread, other threads:[~2004-01-04  8:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-04  8:09 [Bug c++/13561] New: template functions in classes gcc-bugzilla at gcc dot gnu dot org
2004-01-04  8:15 ` [Bug c++/13561] " pinskia at gcc dot gnu dot org

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