This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Eliminate compiler warnings in initializing CGEN_OPINST tables
- From: Doug Evans <dje at transmeta dot com>
- To: Michael Meissner <cgen-mail at the-meissners dot org>
- Cc: cgen at sources dot redhat dot com
- Date: Wed, 6 Aug 2003 14:13:29 -0700 (PDT)
- Subject: Eliminate compiler warnings in initializing CGEN_OPINST tables
- References: <20030806205233.GA30369@tiktok.the-meissners.org>
Michael Meissner writes:
> The default warning level now complains if fields are only partially
> initialized. This means a lot of warnings for the lines of the form:
>
> { END }
>
> generated by opc-opinst.scm. This patch fixes that.
This is also fixed in my constant-beyond-base patch I just tabled.
It can certainly go in.
> 2003-08-06 Michael Meissner <gnu@the-meissners.org>
>
> * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
> the elements for the END record of CGEN_OPINST, silencing
> warnings.
>
> *** cgen/opc-opinst.scm.~1.3.~ 2003-05-15 03:25:02.000000000 -0400
> --- cgen/opc-opinst.scm 2003-08-06 16:38:08.000000000 -0400
> ***************
> *** 54,60 ****
> ins)
> (string-map (lambda (op) (-gen-operand-instance op "OUTPUT"))
> outs)
> ! " { END }\n};\n\n")))
> )
>
> (define (-gen-operand-instance-tables)
> --- 54,60 ----
> ins)
> (string-map (lambda (op) (-gen-operand-instance op "OUTPUT"))
> outs)
> ! " { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 }\n};\n\n")))
> )
>
> (define (-gen-operand-instance-tables)