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]

Re: [patch][fortran] Include coretypes.h in .c files, not in gfortran.h


Steven Bosscher wrote:
On Thu, Jul 12, 2012 at 11:29 AM, Tobias Burnus <burnus@net-b.de> wrote:
On 07/07/2012 11:28 PM, Steven Bosscher wrote:
I must say, I am surprised that gfortran.h includes coretypes.h. The
idea always was to try and keep the front end and the back end as much
separated as possible, and including coretypes.h in the most important
front-end header doesn't fit in that picture.  I initially tried to
just stop including flags.h in e.g. fortran/arith.c because I couldn't
think of anything that arith.h should know from flags.h, but that
breaks the build because arith.c looks at 'pedantic' from the
generated file options.h.

Well, those are much more intertwined:


If one changes "pedantic" to "gfc_option.gfc_pedantic" and does not include "coretypes.h", gfortran.h fails because "tree" is not defined.

Addtionally, I get some failures because of "tls_model".

If one now includes "tree.h" in gfortran.h, it fails because "tree.h" includes "vecir.h", which has at the top:
#ifndef GCC_CORETYPES_H
#error "vecir.h must be included after coretypes.h"
#endif



I think the old version was cleaner. Hence, I would really like to revert your patch, http://gcc.gnu.org/ml/fortran/2012-07/msg00019/fortran_coretypes.diff


Comments? Suggestions?

Tobias


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