[cfe-dev] __declspec(dllexport) ignored when qualifying classes

Michel Morin mimomorin at gmail.com
Thu Oct 25 15:11:58 PDT 2012


The following code

  class __declspec(dllexport) Type {};

compiles fine on gcc (gcc-4.5) on cygwin/mingw.


But clang (clang-3.1 on cygwin/mingw and clang trunk on OS X with
`-ccc-host-triple i386-pc-cygwin` and `-ccc-host-triple i386-pc-mingw32`)
emits a warning:

  warning: 'dllexport' attribute only applies to variables and functions

I also tried to compile it with `-ccc-host-triple i386-pc-win32`,
but got the same warning. Is this intentional behavior?


Regards,
Michel



More information about the cfe-dev mailing list