This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: gengtype indentation patch
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Basile Starynkevitch <basile at starynkevitch dot net>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 Sep 2010 20:08:41 +0200
- Subject: Re: gengtype indentation patch
- References: <20100923195519.8eeaba90.basile@starynkevitch.net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
On Thu, Sep 23, 2010 at 07:55:19PM +0200, Basile Starynkevitch wrote:
> @@ -182,8 +187,7 @@ static void close_output_files (void);
>
> /* Report an error at POS, printing MSG. */
>
> -void
> -error_at_line (const struct fileloc *pos, const char *msg, ...)
> +void error_at_line (const struct fileloc *pos, const char *msg, ...)
> {
> va_list ap;
>
This hunk is incorrect. Function name must be at the beginning of the line.
> @@ -280,7 +284,7 @@ set_lang_bitmap (char *gtfile, lang_bitmap n)
> and files. The numbers returned are overestimates as they does not
> consider repeated files. */
> static size_t
> -measure_input_list (FILE *list)
> +measure_input_list (FILE * list)
> {
> size_t n = 0;
> int c;
This one as well. No space after *.
> @@ -319,8 +323,7 @@ static size_t
> touch *HEREP, and sets *LINEP to NULL. POS is used for
> diagnostics. */
> static bool
> -read_input_line (FILE *list, char **herep, char **linep,
> - struct fileloc *pos)
> +read_input_line (FILE * list, char **herep, char **linep, struct fileloc *pos)
> {
> char *here = *herep;
> char *line;
Likewise.
> @@ -859,8 +862,8 @@ create_field_at (pair_p next, type_p type, const c
>
> /* Create a fake field with the given type and name. NEXT is the next
> field in the chain. */
> -#define create_field(next,type,name) \
> - create_field_all(next,type,name, 0, this_file, __LINE__)
> +#define create_field(next,type,name) \
> + create_field_all(next,type,name, 0, this_file, __LINE__)
>
> /* Like create_field, but the field is only valid when condition COND
> is true. */
I fail to see why this one is needed. It is very common to have the first \
in a macro one space after the ) or end of macro name, and have all the
subsequent \s aligned more on the right, like
#define A(x,y) \
something ... \
and something else \
and the rest
> @@ -1256,7 +1260,7 @@ adjust_field_tree_exp (type_p t, options_p opt ATT
> - Converts pointer-to-char, with no length parameter, to TYPE_STRING;
> - Similarly for arrays of pointer-to-char;
> - Converts structures for which a parameter is provided to
> - TYPE_PARAM_STRUCT;
> + TYPE_PARAM_STRUCT;
> - Handles "special" options.
> */
>
This is wrong too.
Jakub