This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
problem with statement expressions in template class constructors?
- To: egcs-bugs at cygnus dot com
- Subject: problem with statement expressions in template class constructors?
- From: Ian Piumarta <piumarta at prof dot inria dot fr>
- Date: Sat, 25 Apr 1998 02:56:20 +0200
Gnurus,
1. Apologies if this has already been mentioned -- there's so much
traffic here that I can seldom keep up.
2. Can I really be the only person in the world using statement
expressions in template class constructors? (How on earth do you
all deal with EINTR and/or EAGAIN otherwise? ;)
3. The original code from which the following is distilled compiles
correctly with gcc-2.7.2.1, but fails with both egcs-1.02 and
gcc-2.8.1 at compile time:
bug.cc:8: sorry, not implemented: initializer contains unrecognized tree code
---8<--- snip from here ---8<---
// g++ -c bug.cc
// g++ -DEXHIBIT_BUG -c bug.cc
#ifdef EXHIBIT_BUG
template <class arg_t>
#endif
class Bug { public:
Bug(void) { ({ 0; }); }
};
--->8--- to here --->8---
3b. and only in the context of a template class constructor -- I use the
same construct without problems in many other places.
4. Maybe it's me who's doing something wrong? Enlighten me if possible! ;)
5. In case it matters: g++ -v for the two compilers that fail...
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.27/specs
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.1/specs
gcc version 2.8.1
Regards,
Ian
------------------------------- projet SOR -------------------------------
Ian Piumarta, INRIA Rocquencourt, Internet: Ian.Piumarta@inria.fr
BP105, 78153 Le Chesnay Cedex, FRANCE Voice: +33 1 39 63 52 87
----------------------- Systemes a Objets Repartis -----------------------