public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* egcs-19980425: typedef question
@ 1998-04-29 18:36 Andrew Pollard
  0 siblings, 0 replies; only message in thread
From: Andrew Pollard @ 1998-04-29 18:36 UTC (permalink / raw)
  To: egcs

Hello,

[ I'm not sure whether this is to do with the new C++ spec, or egcs
  getting it wrong...]

 I've just tried to compile up some of our work source code with
egcs-19980425 and came across a problem.

The following short code snippet indicates the problem

typedef.cc:
--------------------------------------------------------------------
struct B1 {
};

typedef B1 B2;

struct A {
	operator B1();
};

A::operator B2() {
}
--------------------------------------------------------------------

% g++ -v
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.25/specs
gcc version egcs-2.91.25 19980425 (gcc2 ss-980401 experimental)
% g++ -c typedef.cc
typedef.cc:10: no `A::operator B2()' member function declared in class `A'

Whereas it works fine with gcc-2.7.2.2 and egcs-1.0.2, and earlier
egcs snapshots (not 19980418, but 980328 works).

I realise that the code is a bit strange (the actual example comes
from B1 and B2 being Color and Colour - an attempt to not need to
worry about the 'correct' spelling of Colour).

Is this some new strengthening of the specs for C++ wrt typedef's or
is egcs getting it wrong?

Thanks,
 Andrew.
--
   Andrew Pollard, Auto Simulations Ltd. UK.    | home: andrew@odie.demon.co.uk
   2 Milbanke Court, Milbanke Way, Bracknell    | work: andrewp@autosim.com
Tel:+44(0)1344 426486x103 Fax:+44(0)1344 426615 | http://www.odie.demon.co.uk



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

only message in thread, other threads:[~1998-04-29 18:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-29 18:36 egcs-19980425: typedef question Andrew Pollard

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