This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Useless option parsing code in genautomata.c ?


hi,

   I am trying to output automata description by using -v flag , but it failed.

The option parsing code seems have a little bug?
It parse extra flags in initiate_automaton_gen, after init_md_reader_args.

9327  if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
9328    return (FATAL_EXIT_CODE);
9329
9330   initiate_automaton_gen (argc, argv);

But init_md_reader_args should only be used when programs don't have
their own options.

"/* Programs that don't have their own options can use this entry point
   instead.  */"

I think those option parsing code in initiate_automaton_gen should be
splitted out as a option parsing function,
and use init_md_reader_args_cb instead.

Now I just set v_flag to 1 manually in code to get the output, but I
don't think it is a correct way.
Anyone could tell me the correct way to output automata description,
or help me to confirm this bug?
Thanks.



Best,
Jim


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