[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

__attribute__((weak)) do not working with class constructor in gcc4.1.2



when i compile following sample code in gcc4.1.2 then got this error::
..........................
/tmp/ccZwRVMv.s: Assembler messages:
/tmp/ccZwRVMv.s:251: Error: junk at end of line, first unrecognized
character is `*'  
..............................

***********************
#include<iostream>
#define IOVEC_INLINE_WEAK inline __attribute__((weak))

namespace v2
{

        class IoVec
        {
        public:
                IoVec();
                ~IoVec();
                void test();
           };


        IOVEC_INLINE_WEAK IoVec::IoVec()
        {
        std::cout<<"Cons";
        }

        IoVec::~IoVec()
        {
        }

        IOVEC_INLINE_WEAK void IoVec::test()
        {
        std::cout<<"test()";
        }

       }

      int main()
        {
        v2::IoVec i;
        i.test();
        return 0;
        }

********************
__attribute__((weak)) does work fine with any other methods of class( like
with test() )  ,but not work with contructor
-- 
View this message in context: http://www.nabble.com/__attribute__%28%28weak%29%29-do-not-working--with-class-constructor-in-gcc4.1.2-tp16625421p16625421.html
Sent from the debian-gcc mailing list archive at Nabble.com.


Reply to: