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

[patch] header file re-ordering.


On 10/07/2015 06:02 PM, Jeff Law wrote:
On 10/01/2015 08:33 PM, Andrew MacLeod wrote:
these are all in the main gcc directory. 297 files total.

Everything bootstraps on x86_64-pc-linux-gnu and
powerpc64le-unknown-linux-gnu.  All targets in config-list.mk still
build. Regressions tests also came up clean.

OK for trunk?
So as I look at this and make various spot checks, what really stands out is how often something like alias.h gets included, often in places that have absolutely no business/need to be looking at that file. Cut-n-paste at its worst. It happens to many others, but alias.h seems to have gotten its grubby self into just about everywhere for reasons unkonwn.

I find myself also wondering if a two step approach would make this easier. Step #1 being ordering the headers, step #2 being removal of the duplicates. As you note, the downside is two checkins that would affect most files in the tree. I guess I'll keep slogging through the patch as is...

jeff
Heres the patch for reordered headers. Building as we speak. Hard to fully verify since Ada doesn't seem to bootstrap on trunk at the moment:

+===========================GNAT BUG DETECTED==============================+
| 6.0.0 20151008 (experimental) (x86_64-pc-linux-gnu) GCC error:           |
| in gen_lowpart_common, at emit-rtl.c:1399                                |
| Error detected around s-regpat.adb:1029:22                               |

<...>
raised TYPES.UNRECOVERABLE_ERROR : comperr.adb:423
../gcc-interface/Makefile:311: recipe for target 's-regpat.o' failed


However, the tool has been run, and I've made the minor adjustments required to the source files to make it work. (ie, a few multi-line comments and the fact that mul-tables.c is generated on the tile* targets.

So this is what it should look like. I used -cp. Other languages are bootstrapping, and I have yet to build all the targets... that'll just take a day. Be nice if ada worked tho.

I can run the reduction tool over the weekend (its a long weekend here :-) on this if you want... the other patch is a couple of weeks out of date anyway now.

Andrew

Attachment: backend-order.patch.bz2
Description: application/bzip

Attachment: FE-order.patch.bz2
Description: application/bzip

Attachment: config-order.patch.bz2
Description: application/bzip


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