This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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] Clean up f95-lang.c a bit


Hello,

This is a long-overdue cleanup of f95-lang.c. This file was once added
as an almost one-to-one copy from one of the other languages and
tweaked until it worked. But the comments in the file are misleading,
out-dated, or wrong for other reasons, and there are remnants of the
pre tree-ssa era that never worked or were never used for gfortran.

Let's throw as much of that out as we can! (There will be a follow-up
patch to clean up convert.c also :-)

Bootstrapped&tested on x86_64-unknown-linux-gnu. OK?

Ciao!
Steven

        * f95-lang.c (yyerror, yylex): Remove.
        (clear_binding_stack): Remove, fold into its only user.
        (LANG_HOOKS_PRINT_IDENTIFIER): Do not re-define.
        (ridpointers): Remove.
        (gfc_eh_initialized_p): Make static.
        (gfc_truthvalue_conversion): Move to convert.c.
        (gfc_be_parse_file): Clear binding level stack when done.
        (gfc_print_identifier): Remove.
        (pushlevel): Remove ignored 'ignore' argument.  Update all callers.
        (poplevel): Remove unused 'reverse' argument.  Update all callers.
        (ggc_p): Remove.
        (gfc_builtin_function): Make static. Do not attempt to make RTL for
        builtin functions.
        * convert.c (gfc_truthvalue_conversion): Moved here from f95-lang.c,
        and made static.
        * trans.h (pushlevel, poplevel): Adjust prototypes.
        (gfc_truthvalue_conversion, gfc_builtin_function): Remove prototypes.
        * trans-openmp.c: Update calls to pushlevel and poplevel.
        * trans.c: Likewise.
        * trans-decl.c: Likewise.

Attachment: f95-lang-cleanup.diff.txt
Description: Text document


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