This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unreviewed cygwin/mingw dllimport patch for PRs 5287. 7910,11021


On Wed, 02 Jul 2003 09:49:19 -0400, Jason Merrill <jason@redhat.com> wrote:

>> void bar()
>> {
>>   __attribute__((dllimport))
>>   static int imp_var;   // { dg-error "external linkage required" }
>>   imp_var++;
>> }
>
> It might actually make sense to support this sort of usage on statics in
> inline functions, since they need to be shared between all inlined copies
> of the function regardless of DLL.

On second thought, no, this should be an error.  If we were going to share
these, it would be better to inherit the dllimportness from the function,
not specify it on the variable as well.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]