From: Laurynas Biveinis <laurynas.biveinis@gmail.com>
To: Basile Starynkevitch <basile@starynkevitch.net>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: gengtype improvements for plugins, thirdround! patch 1/7 [declprog]
Date: Wed, 22 Sep 2010 11:08:00 -0000 [thread overview]
Message-ID: <AANLkTi=OZsWujZvAZQ3o3uG-wi0bS=gmgGBfg57H9EMr@mail.gmail.com> (raw)
In-Reply-To: <20100921210301.d92889be.basile@starynkevitch.net>
The indentation of the patch is still (glaringly) wrong in a
significant number of places.
-/* the generated plugin output name & file */
+
+/* the generated plugin output file and name. */
The
+static void
+print_usage (void)
+{
+ printf ("Usage: %s\n", progname);
Wrong indentation.
+/* Parse the program options using getopt_long... */
+static void
+parse_program_options (int argc, char**argv)
+{
+ int opt = -1;
+ while ((opt = getopt_long (argc, argv, "hVdP:S:I:w:r:D",
+ gengtype_long_options, NULL)) >= 0)
+ {
+ switch (opt)
+ {
+ case 'h': /* --help */
+ print_usage ();
+ break;
+ case 'V': /* --version */
+ print_version ();
+ break;
+ case 'd': /* --dump */
+ do_dump = 1;
+ break;
Wrong indentation...
+ /*** Parse the input list and the input files. ***/
/* Parse ... */
+ for (i = 0; i < num_gt_files; i++) {
+ parse_file (gt_files[i]);
+ DBGPRINTF ("parsed file #%d %s", (int) i, gt_files[i]);
+ }
Wrong formatting.
+ if (nb_plugin_files <= 0 || !plugin_files)
+ fatal ("No plugin files given in plugin mode for %s", plugin_output_filename);
+ /* Parse our plugin files. */
+ for (ix = 0; ix < nb_plugin_files; ix++)
+ parse_file (plugin_files[ix]);
+
+ if (hit_error)
+ return 1;
+
+ plugin_output = create_file ("GCC", plugin_output_filename);
+ DBGPRINTF ("created plugin_output %p named %s",
+ (void*) plugin_output, plugin_output->name);
+ }
+ else
+ { /* No plugin files, we are in normal mode. */
+ if (!srcdir)
+ fatal ("gengtype needs a source directory in normal mode");
+ }
Wrong formatting.
+ /* The call to set_gc_used may indirectly call find_param_structure
+ hence enlarge the param_structs list of types. So it should
+ happen before writing the state. */
set_gc_used (variables);
Can you explain this comment? I mean, *all* source processing things
must happen before writing the state, so isn't the comment too
obvious?
+#endif /*ENABLE_CHECKING*/
Space after /* and before */
> gcc/ChangeLog entry:
>
> 2010-09-20 Jeremie Salvucci <jeremie.salvucci@free.fr>
> Basile Starynkevitch <basile@starynkevitch.net>
>
> * gengtype.c: Include getopt.h and version.h.
>
> (lang_bitmap, struct outf, outf_p)
> (get_output_file_with_visibility, oprintf): Definitions moved to
> gengtype.h
> (output_files, header_file, srcdir, srcdir_len, this_file,
> do_dump): No more static variables.
> (do_debug): New.
> (dbgprint_count_type_at): Added new function.
> (gengtype_long_options): New.
> (print_usage, print_version, parse_program_options): New.
> (main): Call parse_program_options, and removed old option
> handling code. Added some debug output.
>
> * gengtype.h: Updated copyright year.
> (lang_bitmap, struct outf, outf_p, header_file, oprintf)
> (get_output_file_with_visibility, srcdir, srcdir_len, do_dump):
> Moved from gengtype.c to here.
> (do_debug, read_state_filename, write_state_filename): New
> variables. (DBGPRINTF, DBGPRINT_COUNT_TYPE): New macros.
>
> * Makefile.in:
> (REVISION): Always defined.
> (version.o): Removed ifdef REVISION_c.
> (s-gtype): Pass arguments to build/gengtype program.
> (build/version.o): Added building rule.
> (build/gengtype$(build_exeext)): Added build/version.o.
--
Laurynas
prev parent reply other threads:[~2010-09-22 1:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 19:41 Basile Starynkevitch
2010-09-21 22:07 ` gengtype improvements for plugins, thirdround! patch 2/7 [verbosity] Basile Starynkevitch
2010-09-21 22:43 ` gengtype improvements for plugins, thirdround! patch 3/7 [inputfile] Basile Starynkevitch
2010-09-22 0:29 ` gengtype improvements for plugins, thirdround! patch 4/7 [filerules] Basile Starynkevitch
2010-09-22 1:50 ` gengtype improvements for plugins, thirdround! patch 5/7 [typedopt] Basile Starynkevitch
2010-09-22 1:58 ` gengtype improvements for plugins, thirdround! patch 6/7 [wstate] Basile Starynkevitch
2010-09-22 2:16 ` Basile Starynkevitch
2010-09-22 3:03 ` gengtype improvements for plugins, thirdround! patch 7/7 [doc] Basile Starynkevitch
2010-09-22 14:17 ` Laurynas Biveinis
2010-09-22 14:08 ` gengtype improvements for plugins, thirdround! patch 6/7 [wstate] Laurynas Biveinis
2010-09-22 12:13 ` gengtype improvements for plugins, thirdround! patch 5/7 [typedopt] Laurynas Biveinis
2010-09-23 19:17 ` Basile Starynkevitch
2010-09-23 19:29 ` Diego Novillo
2010-09-23 19:39 ` Richard Guenther
2010-09-22 12:06 ` gengtype improvements for plugins, thirdround! patch 4/7 [filerules] Laurynas Biveinis
2010-09-22 12:05 ` gengtype improvements for plugins, thirdround! patch 3/7 [inputfile] Laurynas Biveinis
2010-10-18 17:21 ` gengtype patch removing location_s Basile Starynkevitch
2010-10-19 6:57 ` Laurynas Biveinis
2010-10-19 7:11 ` Basile Starynkevitch
2010-10-19 7:27 ` Laurynas Biveinis
2010-10-19 7:29 ` Basile Starynkevitch
2010-10-19 8:17 ` Laurynas Biveinis
2010-10-19 8:49 ` Dave Korn
2010-10-19 16:38 ` Tom Tromey
2010-10-20 20:39 ` gengtype plugin improvement last2round - patch3 [inputfile] Basile Starynkevitch
2010-10-21 4:46 ` Laurynas Biveinis
2010-09-22 11:11 ` gengtype improvements for plugins, thirdround! patch 2/7 [verbosity] Laurynas Biveinis
2010-09-22 11:08 ` Laurynas Biveinis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=OZsWujZvAZQ3o3uG-wi0bS=gmgGBfg57H9EMr@mail.gmail.com' \
--to=laurynas.biveinis@gmail.com \
--cc=basile@starynkevitch.net \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).