This is the mail archive of the 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]
Other format: [Raw text]

Re: [PATH] fix c/10962, slow lookup_field

Thanks Jason for the hint.

Here is the new patch for the mainline, the old one still
applies to 3.3 branch since this is a regression from when
anonymous structs/unions went in.

Bootstraped on powerpc-apple-darwin3.6, bootstraped and regress
tested on i686-pc-linux-gnu.

I will have some testcases which I will post, one pch based one
for c to make sure that I did not brake anything, and one regular
c one for speed testing to make sure that this is not removed again.


2003-05-27 Andrew Pinski <> * ggc.h: Add header guards. * c-decl.c (field_decl_cmp): Add back function. (resort_sorted_fields): New. (finish_struct): Sort fields if number greater than 15 and there are no anymous structs/unions. * c-tree.h: Add ggc.h (lang_type_s): New struct. (lang_type_s_1): Pointer to lang_type_s. (lang_type): Use lang_type_s_1 as s. (resort_sorted_fields): New prototype. * c-typeck.c (lookup_field): Use s in lang_type.

Attachment: fixPR10962.diff
Description: Binary data

Andrew Pinski

On Monday, May 26, 2003, at 10:15 US/Eastern, Jason Merrill wrote:

On Sun, 25 May 2003 23:44:51 -0400, Andrew Pinski <> wrote:

Please ignore this patch as it has problems when used with PCH.

You want the resort_sorted_fields stuff from the C++ frontend.


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