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. Next, I considered adding pedantic to gfc_options, but that, of course, clashes with the define in options.h (it's a macro so a field named 'pedantic' in gfc_options isn't possible.
Won't it work if you just name it, e.g., gfc_pedantic in gfc_options? You still need to set the variable somewhere, but that should reduce the number of files to one (options.c) - or zero if you could make use of option.h's "pedantic". That might be not extremely elegant, but it should work. Or did I miss something important?
Tobias