home *** CD-ROM | disk | FTP | other *** search
- Wed Aug 12 18:18:16 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * i386/winnt.c (i386_pe_dllexport_p): Check TREE_TYPE for
- attributes as well for C++ class members.
- (i386_pe_dllimport_p): Likewise.
-
- Index: gcc-2.95.2/gcc/config/i386//winnt.c
- ===================================================================
- RCS file: /homes/khan/src/CVSROOT/gcc-2.95.2/gcc/config/i386/winnt.c,v
- retrieving revision 1.1.1.1
- diff -u -3 -p -r1.1.1.1 winnt.c
- --- gcc-2.95.2/gcc/config/i386/winnt.c 1999/11/05 01:09:55 1.1.1.1
- +++ gcc-2.95.2/gcc/config/i386/winnt.c 1999/11/05 05:40:04
- @@ -169,6 +169,7 @@ i386_pe_dllexport_p (decl)
- tree decl;
- {
- tree exp;
- + tree context;
-
- if (TREE_CODE (decl) != VAR_DECL
- && TREE_CODE (decl) != FUNCTION_DECL)
- @@ -178,12 +179,18 @@ i386_pe_dllexport_p (decl)
- return 1;
-
- /* Class members get the dllexport status of their class. */
- - if (associated_type (decl))
- + context = associated_type (decl);
- + if (context)
- {
- exp = lookup_attribute ("dllexport",
- - TYPE_ATTRIBUTES (associated_type (decl)));
- + TYPE_ATTRIBUTES (context));
- if (exp)
- return 1;
- +
- + exp = lookup_attribute ("dllexport",
- + TREE_TYPE (context));
- + if (exp)
- + return 1;
- }
-
- return 0;
- @@ -196,6 +203,7 @@ i386_pe_dllimport_p (decl)
- tree decl;
- {
- tree imp;
- + tree context;
-
- if (TREE_CODE (decl) == FUNCTION_DECL
- && TARGET_NOP_FUN_DLLIMPORT)
- @@ -209,10 +217,16 @@ i386_pe_dllimport_p (decl)
- return 1;
-
- /* Class members get the dllimport status of their class. */
- - if (associated_type (decl))
- + context = associated_type (decl);
- + if (context)
- {
- + imp = lookup_attribute ("dllimport",
- + TYPE_ATTRIBUTES (context));
- + if (imp)
- + return 1;
- +
- imp = lookup_attribute ("dllimport",
- - TYPE_ATTRIBUTES (associated_type (decl)));
- + TREE_TYPE (context));
- if (imp)
- return 1;
- }
-