From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92247 invoked by alias); 24 Aug 2015 18:47:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 92230 invoked by uid 89); 24 Aug 2015 18:47:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wi0-f180.google.com Received: from mail-wi0-f180.google.com (HELO mail-wi0-f180.google.com) (209.85.212.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 24 Aug 2015 18:47:57 +0000 Received: by widdq5 with SMTP id dq5so80271407wid.0; Mon, 24 Aug 2015 11:47:54 -0700 (PDT) X-Received: by 10.194.204.163 with SMTP id kz3mr42928368wjc.28.1440442074772; Mon, 24 Aug 2015 11:47:54 -0700 (PDT) Received: from [192.168.1.17] (5-49-98-41.hfc.dyn.abo.bbox.fr. [5.49.98.41]) by smtp.gmail.com with ESMTPSA id ul1sm24409990wjc.30.2015.08.24.11.47.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Aug 2015 11:47:53 -0700 (PDT) From: FX Content-Type: multipart/mixed; boundary="Apple-Mail=_B6DAC232-5BE5-43DB-A85A-C96DD1E2438F" Subject: [libgfortran,patch] Remove never-used debugging code Date: Mon, 24 Aug 2015 18:49:00 -0000 Message-Id: <35A5B3B7-75A6-408F-B600-2901287FD059@gmail.com> Cc: gfortran To: gcc-patches Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3083\)) X-SW-Source: 2015-08/txt/msg01456.txt.bz2 --Apple-Mail=_B6DAC232-5BE5-43DB-A85A-C96DD1E2438F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Content-length: 429 Continuing the summer clean-ups. There is in the init() function some dead debugging code, which as far as I= know is never used: it=E2=80=99s compiled conditionaly on DEBUG being defi= ned, and but we don=E2=80=99t have anything that can define DEBUG. The comm= ented-out =E2=80=9Cresume=E2=80=9D functionality was never implemented in g= fortran. And show_variables() isn=E2=80=99t very useful. OK to commit to trunk? FX --Apple-Mail=_B6DAC232-5BE5-43DB-A85A-C96DD1E2438F Content-Disposition: attachment; filename=unusedcode.ChangeLog Content-Type: application/octet-stream; name="unusedcode.ChangeLog" Content-Transfer-Encoding: 7bit Content-length: 216 2015-08-24 Francois-Xavier Coudert * libgfortran.h (show_variables): Remove prototype. * runtime/environ.c (show_variables): Remove function. * runtime/main.c (init): Remove dead code. --Apple-Mail=_B6DAC232-5BE5-43DB-A85A-C96DD1E2438F Content-Disposition: attachment; filename=unusedcode.diff Content-Type: application/octet-stream; name="unusedcode.diff" Content-Transfer-Encoding: 7bit Content-length: 2551 Index: libgfortran/libgfortran.h =================================================================== --- libgfortran/libgfortran.h (revision 227127) +++ libgfortran/libgfortran.h (working copy) @@ -796,9 +796,6 @@ internal_proto(check_buffered); extern void init_variables (void); internal_proto(init_variables); -extern void show_variables (void); -internal_proto(show_variables); - unit_convert get_unformatted_convert (int); internal_proto(get_unformatted_convert); Index: libgfortran/runtime/environ.c =================================================================== --- libgfortran/runtime/environ.c (revision 227127) +++ libgfortran/runtime/environ.c (working copy) @@ -355,53 +355,6 @@ init_variables (void) } -void -show_variables (void) -{ - variable *v; - int n; - - /* TODO: print version number. */ - estr_write ("GNU Fortran runtime library version " - "UNKNOWN" "\n\n"); - - estr_write ("Environment variables:\n"); - estr_write ("----------------------\n"); - - for (v = variable_table; v->name; v++) - { - n = estr_write (v->name); - print_spaces (25 - n); - - if (v->show == show_integer) - estr_write ("Integer "); - else if (v->show == show_boolean) - estr_write ("Boolean "); - else - estr_write ("String "); - - v->show (v); - estr_write (v->desc); - estr_write ("\n\n"); - } - - /* System error codes */ - - estr_write ("\nRuntime error codes:"); - estr_write ("\n--------------------\n"); - - for (n = LIBERROR_FIRST + 1; n < LIBERROR_LAST; n++) - if (n < 0 || n > 9) - st_printf ("%d %s\n", n, translate_error (n)); - else - st_printf (" %d %s\n", n, translate_error (n)); - - estr_write ("\nCommand line arguments:\n"); - estr_write (" --help Print this list\n"); - - exit (0); -} - /* This is the handling of the GFORTRAN_CONVERT_UNITS environment variable. It is called from environ.c to parse this variable, and from open.c to determine if the user specified a default for an Index: libgfortran/runtime/main.c =================================================================== --- libgfortran/runtime/main.c (revision 227127) +++ libgfortran/runtime/main.c (working copy) @@ -120,15 +120,6 @@ init (void) init_compile_options (); -#ifdef DEBUG - /* Check for special command lines. */ - - if (argc > 1 && strcmp (argv[1], "--help") == 0) - show_variables (); - - /* if (argc > 1 && strcmp(argv[1], "--resume") == 0) resume(); */ -#endif - random_seed_i4 (NULL, NULL, NULL); } --Apple-Mail=_B6DAC232-5BE5-43DB-A85A-C96DD1E2438F--