Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/sh/symbian-cxx.c @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | 77e2b8dfacca |
children |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
1 /* Routines for C++ support for GCC for a Symbian OS targeted SH backend. | 1 /* Routines for C++ support for GCC for a Symbian OS targeted SH backend. |
2 Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. | 2 Copyright (C) 2004, 2005, 2007, 2009, 2010 Free Software Foundation, Inc. |
3 Contributed by RedHat. | 3 Contributed by RedHat. |
4 Most of this code is stolen from i386/winnt.c. | 4 Most of this code is stolen from i386/winnt.c. |
5 | 5 |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
28 #include "flags.h" | 28 #include "flags.h" |
29 #include "tree.h" | 29 #include "tree.h" |
30 #include "expr.h" | 30 #include "expr.h" |
31 #include "tm_p.h" | 31 #include "tm_p.h" |
32 #include "cp/cp-tree.h" /* We need access to the OVL_... macros. */ | 32 #include "cp/cp-tree.h" /* We need access to the OVL_... macros. */ |
33 #include "toplev.h" | 33 #include "diagnostic-core.h" |
34 #include "sh-symbian.h" | 34 #include "sh-symbian.h" |
35 | 35 |
36 | 36 |
37 /* Return the type that we should use to determine if DECL is | 37 /* Return the type that we should use to determine if DECL is |
38 imported or exported. */ | 38 imported or exported. */ |
115 && TREE_STATIC (decl) | 115 && TREE_STATIC (decl) |
116 && TREE_PUBLIC (decl) | 116 && TREE_PUBLIC (decl) |
117 && !DECL_EXTERNAL (decl)) | 117 && !DECL_EXTERNAL (decl)) |
118 { | 118 { |
119 if (!DECL_VIRTUAL_P (decl)) | 119 if (!DECL_VIRTUAL_P (decl)) |
120 error ("definition of static data member %q+D of dllimport'd class", | 120 error ("definition of static data member %q+D of dllimport%'d class", |
121 decl); | 121 decl); |
122 return false; | 122 return false; |
123 } | 123 } |
124 | 124 |
125 /* Since we can't treat a pointer to a dllimport'd symbol as a | 125 /* Since we can't treat a pointer to a dllimport'd symbol as a |
627 } | 627 } |
628 | 628 |
629 sh_symbian_add_attribute (function, attr); | 629 sh_symbian_add_attribute (function, attr); |
630 | 630 |
631 /* Propagate the attribute to any function thunks as well. */ | 631 /* Propagate the attribute to any function thunks as well. */ |
632 for (thunk = DECL_THUNKS (function); thunk; thunk = TREE_CHAIN (thunk)) | 632 for (thunk = DECL_THUNKS (function); thunk; thunk = DECL_CHAIN (thunk)) |
633 if (TREE_CODE (thunk) == FUNCTION_DECL) | 633 if (TREE_CODE (thunk) == FUNCTION_DECL) |
634 sh_symbian_add_attribute (thunk, attr); | 634 sh_symbian_add_attribute (thunk, attr); |
635 } | 635 } |
636 } | 636 } |
637 | 637 |
638 if (TREE_CODE (node) == FUNCTION_DECL && DECL_VIRTUAL_P (node)) | 638 if (TREE_CODE (node) == FUNCTION_DECL && DECL_VIRTUAL_P (node)) |
639 { | 639 { |
640 /* Propagate the attribute to any thunks of this function. */ | 640 /* Propagate the attribute to any thunks of this function. */ |
641 for (thunk = DECL_THUNKS (node); thunk; thunk = TREE_CHAIN (thunk)) | 641 for (thunk = DECL_THUNKS (node); thunk; thunk = DECL_CHAIN (thunk)) |
642 if (TREE_CODE (thunk) == FUNCTION_DECL) | 642 if (TREE_CODE (thunk) == FUNCTION_DECL) |
643 sh_symbian_add_attribute (thunk, attr); | 643 sh_symbian_add_attribute (thunk, attr); |
644 } | 644 } |
645 | 645 |
646 /* Report error if symbol is not accessible at global scope. */ | 646 /* Report error if symbol is not accessible at global scope. */ |