This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch 4/8] Simplify handling of scalar types
- From: Ian Lance Taylor <iant at google dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: Ben Elliston <bje at au1 dot ibm dot com>, Geoff Keating <geoffk at apple dot com>, gcc-patches at gcc dot gnu dot org
- Date: 20 Mar 2007 17:39:03 -0700
- Subject: Re: [patch 4/8] Simplify handling of scalar types
- References: <20070318085745.619269000@mrtock.ucsd.edu> <20070318091115.861432000@mrtock.ucsd.edu>
Zack Weinberg <zackw@panix.com> writes:
> * gengtype.h (struct type): Replace 'sc' with boolean, scalar_is_char.
> (string_type): Don't declare.
> (do_scalar_typedef): Declare.
> (create_scalar_type): Update prototype.
> * gengtype.c (string_type): Make static.
> (scalar_nonchar, scalar_char): New.
> (do_scalar_typedef): Export. Always use scalar_nonchar for the type.
> (resolve_typedef): Use scalar_nonchar for error recovery.
> (create_scalar_type): Remove name_len field. Return scalar_char
> or scalar_nonchar as appropriate.
> (adjust_field_type): Look at scalar_is_char boolean to decide whether
> to use string_type.
> (throughout): Use scalar_nonchar instead of calling create_scalar_type,
> whenever possible.
> (main): Initialize scalar_char and scalar_nonchar before calling
> gen_rtx_next.
> * gengtype-lex.l: Adjust for removal of second argument to
> create_scalar_type. Use yylval.s instead of yylval.t when
> returning SCALAR.
> * gengtype-yacc.y: Type of SCALAR is string. Call
> create_scalar_type from type:SCALAR rule. Adjust for removal of
> second argument to create_scalar_type.
This is OK.
Thanks.
Ian