Hi!

On Tue, Apr 27, 2021 at 10:32:40AM -0500, Bill Schmidt via Gcc-patches wrote:
>       * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope
>       variable.

What makes it interesting that this var has file scope?  Did you mean to
say it has internal linkage ("is static")?  I would just leave that off
completely, anyway (just "New." or "New variable.")

>       (LINELEN): New defined constant.

It isn't a constant, it's a macro.  "New macro."?

> +#define LINELEN 1024
> +static char linebuf[LINELEN];

You never get anywhere close to 1024 I suppose?

> +/* Pointer to a diagnostic function.  */
> +void (*diag) (const char *, ...) __attribute__ ((format (printf, 1, 2)))
> +  = NULL;

This isn't portable: you cannot assign NULL to a pointer to function.
But it will work on all POSIX machines, and those are the only hosts we
support.  Still icky :-)

If you just leave off the initialisation, it will be initialised to 0,
which is exactly the same problem of course, just less explicit.

This pointer is not static btw?  Should it be?


Okay for trunk with a little changelog massaging.  Thanks!


Segher

Reply via email to