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]

C++: duplicate symbols when using -fno-default-inline



Dear egcs-maintainers,

when I use -fno-default-inline and compile the following program p.cc like

   $ /usr/local/egcs/bin/c++ -fno-default-inline -o p p.cc

I get lots of duplicate symbols. Removing the -fno-default-inline solves
the problem. -fno-inline does not have this effect.

Apologies if this is already known. No response necessary. Thanks for doing a
great job.

Best regards,

Claus



************ begin p.cc *************
#include <iostream>

class X
{
public:
    double x;
};

ostream& operator << (ostream & s,X  const & x)
{
    s << x.x;
    return s;
}

int main() {};
******************** end p.cc *******************

System information:

   $ /usr/local/egcs/bin/c++ --version
   egcs-2.90.29 980515 (egcs-1.0.3 release)

   $ uname -a
   Linux tcadnt01 2.0.33 #2 Sat Mar 7 15:44:54 MET 1998 i686 unknown

   SuSE 5.2 Linux, libc.so.5.4.44, PII 300 MHz

-- 
        Claus Fischer           Intel Corporation, RN2-40
                         	2200 Mission College Blvd
	Inside Intel :-)        Santa Clara,CA 05052-8119
				telephone +1-408-765-6808
				fax       +1-408-765-9322
				cfischer@td2cad.intel.com


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