public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/1838
@ 2001-04-01  0:00 Craig Rodrigues
  0 siblings, 0 replies; only message in thread
From: Craig Rodrigues @ 2001-04-01  0:00 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Craig Rodrigues <rodrigc@mediaone.net>
To: gcc-gnats@gcc.gnu.org, pabrabbin@hotmail.com, nobody@gcc.gnu.org
Cc: rodrigc@mediaone.net
Subject: Re: c++/1838
Date: Sat, 17 Feb 2001 16:37:24 -0500

 --C7zPtVaVf+AK4Oqc
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1838&database=gcc
 
 tested with:
 gcc version 2.97 20010211 (experimental) 
 
 Compiling the attached bug.C supplied by Phil yielded the following:
 bug.C:13: explicit specialization in non-namespace scope `struct IDataOutput'
 bug.C:14: invalid use of undefined type `struct IDataOutput'
 bug.C:6: forward declaration of `struct IDataOutput'
 bug.C:14: confused by earlier errors, bailing out   
 
 This did not result in an internal compiler error.
 
 Compiling the same test case under the Digital Unix C++ compiler yielded:
 cxx: Error: bug.C, line 13: explicit specialization is not allowed in the
           current scope
         template <>
 --------^
 cxx: Error: bug.C, line 15: identifier "Indent" is undefined
                 Indent();
 ----------------^
 cxx: Info: 2 errors detected in the compilation of "bug.C".        
 
 This looks like buggy code, but my C++ expertise on templates
 is low, so I can't confirm it.
 
 I recommended that Phil get the latest version of
 gcc from ftp://rawhide.redhat.com , since that fixes a lot
 of bugs in the Redhat 7.0 version of gcc.
 
 Should this bug report be closed?
 -- 
 Craig Rodrigues        
 http://www.gis.net/~craigr    
 rodrigc@mediaone.net          
 
 --C7zPtVaVf+AK4Oqc
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="bug.C"
 
 class string
 {
     char *str;
 };
 
 struct IDataOutput {
         template <typename T>
         inline void WriteElement()
         {
                 Indent();
         }
 
         template <>
         inline void WriteElement<string>() {
 	        Indent();
         }
 
 };
 
 
 --C7zPtVaVf+AK4Oqc--


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-04-01  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-01  0:00 c++/1838 Craig Rodrigues

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