On 5/20/21 6:03 PM, Segher Boessenkool wrote:
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.")
OK.  As you say, just pointing out these are all static linkage, outside all functions for convenience.  You'll find this in quite a number of patches in the series, so you can assume I'll fix this for all of them.

        (LINELEN): New defined constant.
It isn't a constant, it's a macro.  "New macro."?
Hey, these are old-school named constants!  :-)  (No problem, will change.  Again, you will see a lot of this in the change logs.)

+#define LINELEN 1024
+static char linebuf[LINELEN];
You never get anywhere close to 1024 I suppose?

Correct; I'd be surprised if we get to a tenth of that on any line.

+/* 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.
Will do.

This pointer is not static btw?  Should it be?
Yes, looks like it should...
Okay for trunk with a little changelog massaging.  Thanks!

Thank you!

BIll


Segher

Reply via email to