Bug 37652 - Bogus redeclaration warning for `friend __declspec(dllimport) int foo ()'
Summary: Bogus redeclaration warning for `friend __declspec(dllimport) int foo ()'
Status: RESOLVED DUPLICATE of bug 34749
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-25 21:51 UTC by Václav Haisman
Modified: 2008-09-26 03:15 UTC (History)
4 users (show)

See Also:
Host: i686-pc-cygwin
Target: i686-pc-cygwin
Build: i686-pc-cygwin
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Václav Haisman 2008-09-25 21:51:15 UTC
__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)
Comment 1 Danny Smith 2008-09-26 03:15:31 UTC
This is duplicate of 34749

*** This bug has been marked as a duplicate of 34749 ***