This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Adding Python as a possible language and it's usage
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Martin Liška <mliska at suse dot cz>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 23 Jul 2018 14:16:47 +0000
- Subject: Re: [RFC] Adding Python as a possible language and it's usage
- References: <a9d62363-4a0f-88f6-2346-4dcb3bebfaa5@suse.cz>
On Tue, 17 Jul 2018, Martin Liška wrote:
> I've recently touched AWK option generate machinery and it's quite
> unpleasant to make any adjustments. My question is simple: can we
> starting using a scripting language like Python and replace usage of the
> AWK scripts? It's probably question for Steering committee, but I would
> like to see feedback from community.
I'd prefer Python to Awk for this code.
> 4) we can come up with new sanity checks of options:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81397
More generally, I don't think there are any checks that flags specified
for options are known flags at all; I expect a typo in a flag to result in
it being silently ignored.
Common code that reads .opt files into some logical datastructure,
complete with validation including that all flags specified are in the
list of valid flags, followed by converting those structures to whatever
output is required, seems appropriate to me.
--
Joseph S. Myers
joseph@codesourcery.com