public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12068] New: Template class definition generates error
@ 2003-08-26 15:11 menita dot singh at schwab dot com
  2003-08-26 15:37 ` [Bug c++/12068] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: menita dot singh at schwab dot com @ 2003-08-26 15:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           Summary: Template class definition generates error
           Product: gcc
           Version: 2.96 (redhat)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: menita dot singh at schwab dot com
                CC: gcc-bugs at gcc dot gnu dot org

I get a compile error "Internal Error: Segmentation Fault", at this line, where 
i define:

template<class ValueType> class ArrayListImpl<ValueType>::Itr : public 
Iterator<ValueType> {

}
Previoulsy i define:
template<class ValueType> class ArrayListImpl : public List<ValueType>::Impl{
private class Impl;
.....[other stuff]
}


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

* [Bug c++/12068] Template class definition generates error
  2003-08-26 15:11 [Bug c++/12068] New: Template class definition generates error menita dot singh at schwab dot com
@ 2003-08-26 15:37 ` pinskia at gcc dot gnu dot org
  2003-08-26 15:40 ` menita dot singh at schwab dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-26 15:37 UTC (permalink / raw)
  To: gcc-bugs

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

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-26 15:37 -------
Read <http://gcc.gnu.org/bugs.html>, we do not want just a snip of your code.


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

* [Bug c++/12068] Template class definition generates error
  2003-08-26 15:11 [Bug c++/12068] New: Template class definition generates error menita dot singh at schwab dot com
  2003-08-26 15:37 ` [Bug c++/12068] " pinskia at gcc dot gnu dot org
@ 2003-08-26 15:40 ` menita dot singh at schwab dot com
  2003-08-26 15:54 ` bangerth at dealii dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: menita dot singh at schwab dot com @ 2003-08-26 15:40 UTC (permalink / raw)
  To: gcc-bugs

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

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



------- Additional Comments From menita dot singh at schwab dot com  2003-08-26 15:40 -------
correction

I get a compile error "Internal Error: Segmentation Fault", at this line, where 
i define:

template<class ValueType> class ArrayListImpl<ValueType>::Itr : public 
Iterator<ValueType> {

}
Previoulsy i define:
template<class ValueType> class ArrayListImpl : public List<ValueType>::Impl{
private class Itr;
.....[other stuff]
}


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

* [Bug c++/12068] Template class definition generates error
  2003-08-26 15:11 [Bug c++/12068] New: Template class definition generates error menita dot singh at schwab dot com
  2003-08-26 15:37 ` [Bug c++/12068] " pinskia at gcc dot gnu dot org
  2003-08-26 15:40 ` menita dot singh at schwab dot com
@ 2003-08-26 15:54 ` bangerth at dealii dot org
  2003-08-26 17:49 ` menita dot singh at schwab dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2003-08-26 15:54 UTC (permalink / raw)
  To: gcc-bugs

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

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



------- Additional Comments From bangerth at dealii dot org  2003-08-26 15:54 -------
That's not what Andrew meant. We need a complete testcase which we can try 
to compile. Leaving out stuff with "//...more stuff" is not sufficient. Please read the 
page Andrew pointed you to to see what kind of information we need (read the 
section on preprocessed sources). 
 
Thanks 
  Wolfgang


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

* [Bug c++/12068] Template class definition generates error
  2003-08-26 15:11 [Bug c++/12068] New: Template class definition generates error menita dot singh at schwab dot com
                   ` (2 preceding siblings ...)
  2003-08-26 15:54 ` bangerth at dealii dot org
@ 2003-08-26 17:49 ` menita dot singh at schwab dot com
  2003-08-26 17:57 ` pinskia at gcc dot gnu dot org
  2003-09-28 21:46 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: menita dot singh at schwab dot com @ 2003-08-26 17:49 UTC (permalink / raw)
  To: gcc-bugs

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

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



------- Additional Comments From menita dot singh at schwab dot com  2003-08-26 17:49 -------
template<class ValueType = Object> class ArrayListImpl : public 
List<ValueType>::Impl {

   private: class Itr;
   private: Array<ValueType> elemData;
   private: _index numElems; 

     protected: static _index DEFAULT_CAPACITY; //LINUX
     public: ArrayListImpl( _index pInitialCapacity =DEFAULT_CAPACITY );
     public: ArrayListImpl( const ArrayListImpl& pAnother ); 
     public: ArrayListImpl& operator =( const ArrayListImpl& pAnother );
friend class Itr;
};

/******************I GET AN ERROR IN THE FOLLOWING LINE#: *****/
template<class ValueType> class ArrayListImpl<ValueType>::Itr : public 
Iterator<ValueType> {

   private: class Impl : public Iterator<ValueType>::Impl {
      protected: ArrayListImpl<ValueType>& base;
      private: index cursor;
      private: int lastRet;
      private: boolean canRemove;
      protected: Impl( ArrayListImpl<ValueType>& pBase );
      protected: Impl( const ArrayListImpl<ValueType>& pBase );
      protected: Impl( const Impl& pAnother );
      protected: ~Impl();
      private: Impl& operator =( const Impl& pAnother );
      friend class Itr;
   };
   public: Itr( Impl* pImpl );
};


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

* [Bug c++/12068] Template class definition generates error
  2003-08-26 15:11 [Bug c++/12068] New: Template class definition generates error menita dot singh at schwab dot com
                   ` (3 preceding siblings ...)
  2003-08-26 17:49 ` menita dot singh at schwab dot com
@ 2003-08-26 17:57 ` pinskia at gcc dot gnu dot org
  2003-09-28 21:46 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-26 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

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



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-26 17:57 -------
You still are not getting the point the code you gave will not work on any compiler as where is List 
defined and other classes.
>From http://gcc.gnu.org/bugs:
What we need (all of these are needed)
Please include in your bug report all of the following items, the first three of which can be obtained 
from the output of gcc -v:
the exact version of GCC;
the system type;
the options given when GCC was configured/built;
the complete command line that triggers the bug;
the compiler output (error messages, warnings, etc.); and
the preprocessed file (*.i*) that triggers the   bug, generated by adding -save-temps to the 
complete   compilation command, or, in the case of a bug report for the GNAT front end,   a 
complete set of source files (see below).

What we do not want:(this is what you gave us so far.)
A code snippet that won't cause the compiler to produce the   exact output mentioned in the bug 
report (e.g., a snippet with just   a few lines around the one that apparently triggers the bug,   with 
some pieces replaced with ellipses or comments for extra   obfuscation :-)
Bugs in releases or snapshots of GCC not issued by the GNU   Project.  Report them to whoever 
provided you with the release


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

* [Bug c++/12068] Template class definition generates error
  2003-08-26 15:11 [Bug c++/12068] New: Template class definition generates error menita dot singh at schwab dot com
                   ` (4 preceding siblings ...)
  2003-08-26 17:57 ` pinskia at gcc dot gnu dot org
@ 2003-09-28 21:46 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-28 21:46 UTC (permalink / raw)
  To: gcc-bugs

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

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-09-28 21:28 -------
2.96 is a non-supported version, also there has been many releases since 2000. 3.3.1 is 
the lastest, 3.3.2 will be released next month.
Closing as there is no way to reproduce this without a testcase but I would try a newer 
GCC first any way.


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

end of thread, other threads:[~2003-09-28 21:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-26 15:11 [Bug c++/12068] New: Template class definition generates error menita dot singh at schwab dot com
2003-08-26 15:37 ` [Bug c++/12068] " pinskia at gcc dot gnu dot org
2003-08-26 15:40 ` menita dot singh at schwab dot com
2003-08-26 15:54 ` bangerth at dealii dot org
2003-08-26 17:49 ` menita dot singh at schwab dot com
2003-08-26 17:57 ` pinskia at gcc dot gnu dot org
2003-09-28 21:46 ` 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).