This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37652] New: Bogus redeclaration warning for `friend __declspec(dllimport) int foo ()'
- From: "v dot haisman at sh dot cvut dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Sep 2008 21:51:16 -0000
- Subject: [Bug c++/37652] New: Bogus redeclaration warning for `friend __declspec(dllimport) int foo ()'
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
__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)
--
Summary: Bogus redeclaration warning for `friend
__declspec(dllimport) int foo ()'
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: v dot haisman at sh dot cvut dot cz
GCC build triplet: i686-pc-cygwin
GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37652