This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

overloaded funcs and anon unions don't coexist


Hi - 

I'm using the latest snapshot of egcs and have encountered a problem
that doesn't appear when using gcc-2.7.2.3.  I have a class with both
overloaded functions and an anonymous union as members:

struct A {
  int a(int);
  int a(long);
  union
  {
    float x;
    int i;
  };
};

this fragment compiles under gcc-2.7.2.3 but not under egcs:

110% /usr/bin/g++ -v
 /usr/bin/gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs
gcc version 2.7.2.3
111% /usr/bin/g++ -c frag.C
112% g++ -v
Reading specs from
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.28/specs
gcc version egcs-2.91.28 19980508 (gcc2 ss-980502 experimental)
113% g++ -c frag.C
frag.C:8: data member `union A::{anonymous} A::{anon}' conflicts with
frag.C:9: sorry, not implemented: `overload' not supported by dump_decl
:9: function member `'

Any help greatly appreciated.

Dave

-- 
David Morrison  Brookhaven National Laboratory  phone: 516-344-5840
                Physics Department, Bldg 510 C    fax: 516-344-3253
		          Upton, NY 11973-5000  email: dave@bnl.gov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]