This is the mail archive of the gcc-bugs@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]

RE: c++/4814: "Internal compiler error" when using w32api


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.


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