This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: c++/4814: "Internal compiler error" when using w32api
- To: gcc-bugs at gcc dot gnu dot org
- Subject: RE: c++/4814: "Internal compiler error" when using w32api
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- Date: Thu, 8 Nov 2001 13:45:28 +1100 (EST)
This is really the same as c++/3394. Mumit Khan's patch fixes on mingw32
build.
Here is my version of Mumit's patch for current trunk:
@@ -12824,7 +12827,14 @@ xref_basetypes (code_type_node, name, re
tree base;
int i, len;
- enum tag_types tag_code = (enum tag_types) tree_low_cst (code_type_node,
1);
+
+ /* If we are called from the parser, code_type_node will sometimes be a
+ TREE_LIST. This indicates that the user wrote
+ "class __attribute__ ((foo)) bar". Extract the list.value. */
+
+ enum tag_types tag_code = (enum tag_types) tree_low_cst (
+ (TREE_CODE (code_type_node) == TREE_LIST) ? TREE_VALUE (code_type_node)
+ : code_type_node, 1);
PR 3394 was caused by user code
class __attribute__((dllimport)) bar
PR 4814 is caused by
struct __attribute__((com_interface)) bar
Danny
http://briefcase.yahoo.com.au - Yahoo! Briefcase
- Manage your files online.