https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54687
--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> --- (In reply to Manuel López-Ibáñez from comment #5) > > Is there still something missing? > Note that the options machinery has ways to encode String->Enum options, so > things like gfc_handle_coarray_option and the handling of OPT_finit_real_ > are redundant (and others). Pending patch (awaiting ME review): https://gcc.gnu.org/ml/gcc-patches/2014-12/msg01377.html > Also, my intuition tells me that any explicit handling of optimization > options that does not use the common machinery such as: > if (gfc_option.flag_protect_parens == -1) > if (gfc_option.flag_stack_arrays == -1) Those should be fine as they are completely handled in the FE: The protect_parens translates into PAREN_EXPR and stack_arrays is also a choice done by the FE. > In the future, it would be ideal to have separate option structs for > FE-specific options, such that not all FEs have to see all options from all > other FEs. Although moving options from gfc_option_t to the globally > generated option struct may seem a step backward in that respect, it is > actually a step forward, since those separated structs should be generated > directly from the *.opt files. I concur. I think it also would be useful to support combined options like Fortran's -ffpe-trap= and -fcheck= or common's -fsanitize=.