This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Useless option parsing code in genautomata.c ?
- From: "ccg ijsj" <ccg dot ijsj at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 15 Jan 2009 17:51:30 +0800
- Subject: Useless option parsing code in genautomata.c ?
- References: <582707f00901150147w2ed63773q9e401d40b68ac271@mail.gmail.com>
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