This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Unreviewed cygwin/mingw dllimport patch for PRs 5287. 7910,11021
- From: Jason Merrill <jason at redhat dot com>
- To: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Christopher Faylor <cgf at redhat dot com>
- Date: Wed, 02 Jul 2003 09:55:22 -0400
- Subject: Re: Unreviewed cygwin/mingw dllimport patch for PRs 5287. 7910,11021
- References: <20030611222042.7283.qmail@web21406.mail.yahoo.com><wvlptktxcm8.fsf@prospero.boston.redhat.com>
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