[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    ICE with buggy code
From:       Jeroen () MMR ! be
Date:       1999-04-30 11:40:12
[Download RAW message or body]

// gcc version egcs-2.93.20 19990427 (gcc2 ss-980929 experimental)
/*
g++ test2.cpp
test2.cpp:26: parse error before `('
test2.cpp:29: ANSI C++ forbids declaration `m_b' with no type
test2.cpp:29: ANSI C++ forbids declaration `m_c' with no type
test2.cpp:29: initialization to `int' from `long int *' lacks a cast
test2.cpp:29: parse error before `}'
test2.cpp:30: destructors must be member functions
test2.cpp: In function `void A()':
test2.cpp:30: type `int' argument given to `delete', expected pointer
test2.cpp: At top level:
test2.cpp:32: parse error before `private'
test2.cpp:34: conflicting types for `long int m_b'
test2.cpp:29: previous declaration as `int m_b'
test2.cpp:35: conflicting types for `long int * m_c'
test2.cpp:29: previous declaration as `int m_c'
test2.cpp:36: parse error before `}'
test2.cpp:39: syntax error before `;'
test2.cpp: In function `void __static_initialization_and_destruction(int,
int)':
test2.cpp:45: Internal compiler error in `make_decl_rtl', at varasm.c:745
Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
*/
//
class A()
{
 public:
  A() { m_a=10; m_b=10; m_c=new long; }
  ~A() { delete m_c; }

 private:
  long m_a;
  long m_b;
  long* m_c;
};


A a;

int main()
{
  return 0;

};

--
Jeroen Dobbelaere
Software Design Engineer
Micro-Matic Research <http://www.mmr.be>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic