__declspec(dllimport) int foo (); struct S { friend __declspec(dllimport) int foo (); }; This code gives me the following warning: dllexport_test.cxx:5: warning: 'int foo()' redeclared without dllimport attribute: previous dllimport ignored I think it is bogus. I the code clearly declares the same thing in the friend declaration. The used GCC is: amber2::wilx:~/tmp/log4cplus-svn> g++-4 -v Using built-in specs. Target: i686-pc-cygwin Configured with: /gnu/gcc/release/gcc4-4.3.2-1/src/gcc-4.3.2/configure --srcdir=/gnu/gcc/release/gcc4-4.3.2-1/src/gcc-4.3.2 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/sbin --localstatedir=/var --sysconfdir=/etc --datadir=/usr/share --infodir=/usr/share/info --mandir=/usr/share/man -v --with-gmp=/usr --with-mpfr=/usr --enable-bootstrap --enable-version-specific-runtime-libs --with-slibdir=/usr/bin --libexecdir=/usr/lib --enable-static --enable-shared --enable-shared-libgcc --enable-__cxa_atexit --with-gnu-ld --with-gnu-as --with-dwarf2 --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,objc,obj-c++ --disable-symvers --enable-libjava --program-suffix=-4 Thread model: single gcc version 4.3.2 20080827 (alpha-testing) 1 (GCC)
This is duplicate of 34749 *** This bug has been marked as a duplicate of 34749 ***