[Refresh]: patch for C++ parser bug with function attributes

Danny Smith danny_r_smith_2001@yahoo.co.nz
Fri Sep 21 18:25:00 GMT 2001


 --- "Joseph S. Myers" <jsm28@cam.ac.uk> wrote: > On Wed, 5 Sep 2001,
Danny Smith wrote:
> > The attached GCC patch fixes a previously reported problem with
> > function
> > attributes (see
> http://gcc.gnu.org/ml/gcc-bugs/1999-07/msg00835.html ). 
> 
> I hope this problem is now fixed on the mainline with my table-driven
> attributes patch.  Could you test this?
> 
> If it is fixed, could you produce a minimal testcase for the problem
> (fails before, passes now) that is suitable to go in the GCC
> testsuite?
> 


The patch does indeed fix the reported bug.  I will prepare testcase.

Tested with this configuration:

Reading specs from d:\mingw\bin\..\lib\gcc-lib\mingw32\3.1\specs
Configured with: ../gcc/configure --target=mingw32 --host=mingw32
--build=mingw32 --prefix=/mingw --enable-sjlj-exceptions
--enable-threads --disable-nls --enable-languages=c++,f77
--disable-win32-registry
Thread model: win32
gcc version 3.1 20010920 (experimental)

This correction to config/i386/i386.c was needed for bootstrap build

--- i386.c.orig	Fri Sep 21 13:27:04 2001
+++ i386.c	Fri Sep 21 23:48:45 2001
@@ -989,8 +989,8 @@ const struct attribute_spec ix86_attribu
      passed in registers.  */
   { "regparm",   1, 1, false, true,  true, 
ix86_handle_regparm_attribute },
 #ifdef TARGET_DLLIMPORT_DECL_ATTRIBUTES
-  { "dllimport", 1, 1, false, false, false, ix86_handle_dll_attribute
},
-  { "dllexport", 1, 1, false, false, false, ix86_handle_dll_attribute
},
+  { "dllimport", 0, 0, false, false, false, ix86_handle_dll_attribute
},
+  { "dllexport", 0, 0, false, false, false, ix86_handle_dll_attribute
},
   { "shared",    1, 1, true,  false, false,
ix86_handle_shared_attribute },
 #endif
   { NULL,        0, 0, false, false, false, NULL }  





http://travel.yahoo.com.au - Yahoo! Travel
- Got Itchy feet? Get inspired!



More information about the Gcc-patches mailing list