public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Add file support and functions for diagnostic support
@ 2020-09-16 21:28 William Schmidt
  0 siblings, 0 replies; 10+ messages in thread
From: William Schmidt @ 2020-09-16 21:28 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:8794c794335fa37c3e73c9b95240eb4062a92ef6

commit 8794c794335fa37c3e73c9b95240eb4062a92ef6
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Wed Jun 17 09:52:26 2020 -0500

    rs6000: Add file support and functions for diagnostic support
    
    2020-07-26  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope
            variable.
            (ovld_file): Likewise.
            (header_file): Likewise.
            (init_file): Likewise.
            (defines_file): Likewise.
            (pgm_path): Likewise.
            (bif_path): Likewise.
            (ovld_path): Likewise.
            (header_path): Likewise.
            (init_path): Likewise.
            (defines_path): Likewise.
            (LINELEN): New defined constant.
            (linebuf): New filescope variable.
            (line): Likewise.
            (pos): Likewise.
            (diag): Likewise.
            (bif_diag): New function.
            (ovld_diag): New function.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 48 +++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index 462387f4b44..8c8fad66edf 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -139,3 +139,51 @@ along with GCC; see the file COPYING3.  If not see
 #include <string.h>
 #include <assert.h>
 #include <unistd.h>
+
+/* Input and output file descriptors and pathnames.  */
+static FILE *bif_file;
+static FILE *ovld_file;
+static FILE *header_file;
+static FILE *init_file;
+static FILE *defines_file;
+
+static const char *pgm_path;
+static const char *bif_path;
+static const char *ovld_path;
+static const char *header_path;
+static const char *init_path;
+static const char *defines_path;
+
+/* Position information.  Note that "pos" is zero-indexed, but users
+   expect one-indexed column information, so representations of "pos"
+   as columns in diagnostic messages must be adjusted.  */
+#define LINELEN 1024
+static char linebuf[LINELEN];
+static int line;
+static int pos;
+
+/* Pointer to a diagnostic function.  */
+void (*diag) (const char *, ...) __attribute__ ((format (printf, 1, 2)))
+  = NULL;
+
+/* Custom diagnostics.  */
+static void __attribute__ ((format (printf, 1, 2)))
+bif_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", bif_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+
+static void __attribute__ ((format (printf, 1, 2)))
+ovld_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", ovld_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Add file support and functions for diagnostic support
@ 2020-10-29 19:49 William Schmidt
  0 siblings, 0 replies; 10+ messages in thread
From: William Schmidt @ 2020-10-29 19:49 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4d4835eea5cf7ccb7fe8cdb5f1b226810bb1ac1b

commit 4d4835eea5cf7ccb7fe8cdb5f1b226810bb1ac1b
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Wed Jun 17 09:52:26 2020 -0500

    rs6000: Add file support and functions for diagnostic support
    
    2020-07-26  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope
            variable.
            (ovld_file): Likewise.
            (header_file): Likewise.
            (init_file): Likewise.
            (defines_file): Likewise.
            (pgm_path): Likewise.
            (bif_path): Likewise.
            (ovld_path): Likewise.
            (header_path): Likewise.
            (init_path): Likewise.
            (defines_path): Likewise.
            (LINELEN): New defined constant.
            (linebuf): New filescope variable.
            (line): Likewise.
            (pos): Likewise.
            (diag): Likewise.
            (bif_diag): New function.
            (ovld_diag): New function.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 48 +++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index 462387f4b44..8c8fad66edf 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -139,3 +139,51 @@ along with GCC; see the file COPYING3.  If not see
 #include <string.h>
 #include <assert.h>
 #include <unistd.h>
+
+/* Input and output file descriptors and pathnames.  */
+static FILE *bif_file;
+static FILE *ovld_file;
+static FILE *header_file;
+static FILE *init_file;
+static FILE *defines_file;
+
+static const char *pgm_path;
+static const char *bif_path;
+static const char *ovld_path;
+static const char *header_path;
+static const char *init_path;
+static const char *defines_path;
+
+/* Position information.  Note that "pos" is zero-indexed, but users
+   expect one-indexed column information, so representations of "pos"
+   as columns in diagnostic messages must be adjusted.  */
+#define LINELEN 1024
+static char linebuf[LINELEN];
+static int line;
+static int pos;
+
+/* Pointer to a diagnostic function.  */
+void (*diag) (const char *, ...) __attribute__ ((format (printf, 1, 2)))
+  = NULL;
+
+/* Custom diagnostics.  */
+static void __attribute__ ((format (printf, 1, 2)))
+bif_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", bif_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+
+static void __attribute__ ((format (printf, 1, 2)))
+ovld_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", ovld_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Add file support and functions for diagnostic support
@ 2020-10-27 16:27 William Schmidt
  0 siblings, 0 replies; 10+ messages in thread
From: William Schmidt @ 2020-10-27 16:27 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2396c3f06e39aa81b9657a0a464b3af5aa470715

commit 2396c3f06e39aa81b9657a0a464b3af5aa470715
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Wed Jun 17 09:52:26 2020 -0500

    rs6000: Add file support and functions for diagnostic support
    
    2020-07-26  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope
            variable.
            (ovld_file): Likewise.
            (header_file): Likewise.
            (init_file): Likewise.
            (defines_file): Likewise.
            (pgm_path): Likewise.
            (bif_path): Likewise.
            (ovld_path): Likewise.
            (header_path): Likewise.
            (init_path): Likewise.
            (defines_path): Likewise.
            (LINELEN): New defined constant.
            (linebuf): New filescope variable.
            (line): Likewise.
            (pos): Likewise.
            (diag): Likewise.
            (bif_diag): New function.
            (ovld_diag): New function.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 48 +++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index 462387f4b44..8c8fad66edf 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -139,3 +139,51 @@ along with GCC; see the file COPYING3.  If not see
 #include <string.h>
 #include <assert.h>
 #include <unistd.h>
+
+/* Input and output file descriptors and pathnames.  */
+static FILE *bif_file;
+static FILE *ovld_file;
+static FILE *header_file;
+static FILE *init_file;
+static FILE *defines_file;
+
+static const char *pgm_path;
+static const char *bif_path;
+static const char *ovld_path;
+static const char *header_path;
+static const char *init_path;
+static const char *defines_path;
+
+/* Position information.  Note that "pos" is zero-indexed, but users
+   expect one-indexed column information, so representations of "pos"
+   as columns in diagnostic messages must be adjusted.  */
+#define LINELEN 1024
+static char linebuf[LINELEN];
+static int line;
+static int pos;
+
+/* Pointer to a diagnostic function.  */
+void (*diag) (const char *, ...) __attribute__ ((format (printf, 1, 2)))
+  = NULL;
+
+/* Custom diagnostics.  */
+static void __attribute__ ((format (printf, 1, 2)))
+bif_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", bif_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+
+static void __attribute__ ((format (printf, 1, 2)))
+ovld_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", ovld_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Add file support and functions for diagnostic support
@ 2020-09-14 13:57 William Schmidt
  0 siblings, 0 replies; 10+ messages in thread
From: William Schmidt @ 2020-09-14 13:57 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:13a4b95003ee6eaec4410701465da2856fe38cfd

commit 13a4b95003ee6eaec4410701465da2856fe38cfd
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Wed Jun 17 09:52:26 2020 -0500

    rs6000: Add file support and functions for diagnostic support
    
    2020-07-26  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope
            variable.
            (ovld_file): Likewise.
            (header_file): Likewise.
            (init_file): Likewise.
            (defines_file): Likewise.
            (pgm_path): Likewise.
            (bif_path): Likewise.
            (ovld_path): Likewise.
            (header_path): Likewise.
            (init_path): Likewise.
            (defines_path): Likewise.
            (LINELEN): New defined constant.
            (linebuf): New filescope variable.
            (line): Likewise.
            (pos): Likewise.
            (diag): Likewise.
            (bif_diag): New function.
            (ovld_diag): New function.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 48 +++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index 462387f4b44..8c8fad66edf 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -139,3 +139,51 @@ along with GCC; see the file COPYING3.  If not see
 #include <string.h>
 #include <assert.h>
 #include <unistd.h>
+
+/* Input and output file descriptors and pathnames.  */
+static FILE *bif_file;
+static FILE *ovld_file;
+static FILE *header_file;
+static FILE *init_file;
+static FILE *defines_file;
+
+static const char *pgm_path;
+static const char *bif_path;
+static const char *ovld_path;
+static const char *header_path;
+static const char *init_path;
+static const char *defines_path;
+
+/* Position information.  Note that "pos" is zero-indexed, but users
+   expect one-indexed column information, so representations of "pos"
+   as columns in diagnostic messages must be adjusted.  */
+#define LINELEN 1024
+static char linebuf[LINELEN];
+static int line;
+static int pos;
+
+/* Pointer to a diagnostic function.  */
+void (*diag) (const char *, ...) __attribute__ ((format (printf, 1, 2)))
+  = NULL;
+
+/* Custom diagnostics.  */
+static void __attribute__ ((format (printf, 1, 2)))
+bif_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", bif_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+
+static void __attribute__ ((format (printf, 1, 2)))
+ovld_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", ovld_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Add file support and functions for diagnostic support
@ 2020-08-28 20:06 William Schmidt
  0 siblings, 0 replies; 10+ messages in thread
From: William Schmidt @ 2020-08-28 20:06 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e8faa65ca454ebf619dd5c58d1db98967942ff56

commit e8faa65ca454ebf619dd5c58d1db98967942ff56
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Wed Jun 17 09:52:26 2020 -0500

    rs6000: Add file support and functions for diagnostic support
    
    2020-07-26  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope
            variable.
            (ovld_file): Likewise.
            (header_file): Likewise.
            (init_file): Likewise.
            (defines_file): Likewise.
            (pgm_path): Likewise.
            (bif_path): Likewise.
            (ovld_path): Likewise.
            (header_path): Likewise.
            (init_path): Likewise.
            (defines_path): Likewise.
            (LINELEN): New defined constant.
            (linebuf): New filescope variable.
            (line): Likewise.
            (pos): Likewise.
            (diag): Likewise.
            (bif_diag): New function.
            (ovld_diag): New function.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 48 +++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index 462387f4b44..8c8fad66edf 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -139,3 +139,51 @@ along with GCC; see the file COPYING3.  If not see
 #include <string.h>
 #include <assert.h>
 #include <unistd.h>
+
+/* Input and output file descriptors and pathnames.  */
+static FILE *bif_file;
+static FILE *ovld_file;
+static FILE *header_file;
+static FILE *init_file;
+static FILE *defines_file;
+
+static const char *pgm_path;
+static const char *bif_path;
+static const char *ovld_path;
+static const char *header_path;
+static const char *init_path;
+static const char *defines_path;
+
+/* Position information.  Note that "pos" is zero-indexed, but users
+   expect one-indexed column information, so representations of "pos"
+   as columns in diagnostic messages must be adjusted.  */
+#define LINELEN 1024
+static char linebuf[LINELEN];
+static int line;
+static int pos;
+
+/* Pointer to a diagnostic function.  */
+void (*diag) (const char *, ...) __attribute__ ((format (printf, 1, 2)))
+  = NULL;
+
+/* Custom diagnostics.  */
+static void __attribute__ ((format (printf, 1, 2)))
+bif_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", bif_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+
+static void __attribute__ ((format (printf, 1, 2)))
+ovld_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", ovld_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Add file support and functions for diagnostic support
@ 2020-08-20 16:37 William Schmidt
  0 siblings, 0 replies; 10+ messages in thread
From: William Schmidt @ 2020-08-20 16:37 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:876c7a9bbbc3c5e318a80f2ada67e132251b591d

commit 876c7a9bbbc3c5e318a80f2ada67e132251b591d
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Wed Jun 17 09:52:26 2020 -0500

    rs6000: Add file support and functions for diagnostic support
    
    2020-07-26  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope
            variable.
            (ovld_file): Likewise.
            (header_file): Likewise.
            (init_file): Likewise.
            (defines_file): Likewise.
            (pgm_path): Likewise.
            (bif_path): Likewise.
            (ovld_path): Likewise.
            (header_path): Likewise.
            (init_path): Likewise.
            (defines_path): Likewise.
            (LINELEN): New defined constant.
            (linebuf): New filescope variable.
            (line): Likewise.
            (pos): Likewise.
            (diag): Likewise.
            (bif_diag): New function.
            (ovld_diag): New function.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 48 +++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index 462387f4b44..8c8fad66edf 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -139,3 +139,51 @@ along with GCC; see the file COPYING3.  If not see
 #include <string.h>
 #include <assert.h>
 #include <unistd.h>
+
+/* Input and output file descriptors and pathnames.  */
+static FILE *bif_file;
+static FILE *ovld_file;
+static FILE *header_file;
+static FILE *init_file;
+static FILE *defines_file;
+
+static const char *pgm_path;
+static const char *bif_path;
+static const char *ovld_path;
+static const char *header_path;
+static const char *init_path;
+static const char *defines_path;
+
+/* Position information.  Note that "pos" is zero-indexed, but users
+   expect one-indexed column information, so representations of "pos"
+   as columns in diagnostic messages must be adjusted.  */
+#define LINELEN 1024
+static char linebuf[LINELEN];
+static int line;
+static int pos;
+
+/* Pointer to a diagnostic function.  */
+void (*diag) (const char *, ...) __attribute__ ((format (printf, 1, 2)))
+  = NULL;
+
+/* Custom diagnostics.  */
+static void __attribute__ ((format (printf, 1, 2)))
+bif_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", bif_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+
+static void __attribute__ ((format (printf, 1, 2)))
+ovld_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", ovld_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Add file support and functions for diagnostic support
@ 2020-08-18 18:43 William Schmidt
  0 siblings, 0 replies; 10+ messages in thread
From: William Schmidt @ 2020-08-18 18:43 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f215b49fb0b9e66d4977e3b70cd9cd84c44e4f63

commit f215b49fb0b9e66d4977e3b70cd9cd84c44e4f63
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Wed Jun 17 09:52:26 2020 -0500

    rs6000: Add file support and functions for diagnostic support
    
    2020-07-26  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope
            variable.
            (ovld_file): Likewise.
            (header_file): Likewise.
            (init_file): Likewise.
            (defines_file): Likewise.
            (pgm_path): Likewise.
            (bif_path): Likewise.
            (ovld_path): Likewise.
            (header_path): Likewise.
            (init_path): Likewise.
            (defines_path): Likewise.
            (LINELEN): New defined constant.
            (linebuf): New filescope variable.
            (line): Likewise.
            (pos): Likewise.
            (diag): Likewise.
            (bif_diag): New function.
            (ovld_diag): New function.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 48 +++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index 462387f4b44..8c8fad66edf 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -139,3 +139,51 @@ along with GCC; see the file COPYING3.  If not see
 #include <string.h>
 #include <assert.h>
 #include <unistd.h>
+
+/* Input and output file descriptors and pathnames.  */
+static FILE *bif_file;
+static FILE *ovld_file;
+static FILE *header_file;
+static FILE *init_file;
+static FILE *defines_file;
+
+static const char *pgm_path;
+static const char *bif_path;
+static const char *ovld_path;
+static const char *header_path;
+static const char *init_path;
+static const char *defines_path;
+
+/* Position information.  Note that "pos" is zero-indexed, but users
+   expect one-indexed column information, so representations of "pos"
+   as columns in diagnostic messages must be adjusted.  */
+#define LINELEN 1024
+static char linebuf[LINELEN];
+static int line;
+static int pos;
+
+/* Pointer to a diagnostic function.  */
+void (*diag) (const char *, ...) __attribute__ ((format (printf, 1, 2)))
+  = NULL;
+
+/* Custom diagnostics.  */
+static void __attribute__ ((format (printf, 1, 2)))
+bif_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", bif_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+
+static void __attribute__ ((format (printf, 1, 2)))
+ovld_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", ovld_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Add file support and functions for diagnostic support
@ 2020-07-27 18:46 William Schmidt
  0 siblings, 0 replies; 10+ messages in thread
From: William Schmidt @ 2020-07-27 18:46 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ba74f59c8ad0f0c3456919b8cc653dba8580cf7d

commit ba74f59c8ad0f0c3456919b8cc653dba8580cf7d
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Wed Jun 17 09:52:26 2020 -0500

    rs6000: Add file support and functions for diagnostic support
    
    2020-07-26  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope
            variable.
            (ovld_file): Likewise.
            (header_file): Likewise.
            (init_file): Likewise.
            (defines_file): Likewise.
            (pgm_path): Likewise.
            (bif_path): Likewise.
            (ovld_path): Likewise.
            (header_path): Likewise.
            (init_path): Likewise.
            (defines_path): Likewise.
            (LINELEN): New defined constant.
            (linebuf): New filescope variable.
            (line): Likewise.
            (pos): Likewise.
            (diag): Likewise.
            (bif_diag): New function.
            (ovld_diag): New function.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 48 +++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index 462387f4b44..8c8fad66edf 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -139,3 +139,51 @@ along with GCC; see the file COPYING3.  If not see
 #include <string.h>
 #include <assert.h>
 #include <unistd.h>
+
+/* Input and output file descriptors and pathnames.  */
+static FILE *bif_file;
+static FILE *ovld_file;
+static FILE *header_file;
+static FILE *init_file;
+static FILE *defines_file;
+
+static const char *pgm_path;
+static const char *bif_path;
+static const char *ovld_path;
+static const char *header_path;
+static const char *init_path;
+static const char *defines_path;
+
+/* Position information.  Note that "pos" is zero-indexed, but users
+   expect one-indexed column information, so representations of "pos"
+   as columns in diagnostic messages must be adjusted.  */
+#define LINELEN 1024
+static char linebuf[LINELEN];
+static int line;
+static int pos;
+
+/* Pointer to a diagnostic function.  */
+void (*diag) (const char *, ...) __attribute__ ((format (printf, 1, 2)))
+  = NULL;
+
+/* Custom diagnostics.  */
+static void __attribute__ ((format (printf, 1, 2)))
+bif_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", bif_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+
+static void __attribute__ ((format (printf, 1, 2)))
+ovld_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", ovld_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Add file support and functions for diagnostic support
@ 2020-07-17 17:21 William Schmidt
  0 siblings, 0 replies; 10+ messages in thread
From: William Schmidt @ 2020-07-17 17:21 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e7f5d5c1372ac604a68da7c7d2adfe5d2b50b67b

commit e7f5d5c1372ac604a68da7c7d2adfe5d2b50b67b
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Wed Jun 17 09:52:26 2020 -0500

    rs6000: Add file support and functions for diagnostic support
    
    2020-06-17  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope
            variable.
            (ovld_file): Likewise.
            (header_file): Likewise.
            (init_file): Likewise.
            (defines_file): Likewise.
            (pgm_path): Likewise.
            (bif_path): Likewise.
            (ovld_path): Likewise.
            (header_path): Likewise.
            (init_path): Likewise.
            (defines_path): Likewise.
            (LINELEN): New defined constant.
            (linebuf): New filescope variable.
            (line): Likewise.
            (pos): Likewise.
            (diag): Likewise.
            (bif_diag): New function.
            (ovld_diag): New function.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 48 +++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index 1ef12aa0413..db7afa31f87 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -140,3 +140,51 @@ along with GCC; see the file COPYING3.  If not see
 #include <string.h>
 #include <assert.h>
 #include <unistd.h>
+
+/* Input and output file descriptors and pathnames.  */
+static FILE *bif_file;
+static FILE *ovld_file;
+static FILE *header_file;
+static FILE *init_file;
+static FILE *defines_file;
+
+static const char *pgm_path;
+static const char *bif_path;
+static const char *ovld_path;
+static const char *header_path;
+static const char *init_path;
+static const char *defines_path;
+
+/* Position information.  Note that "pos" is zero-indexed, but users
+   expect one-indexed column information, so representations of "pos"
+   as columns in diagnostic messages must be adjusted.  */
+#define LINELEN 1024
+static char linebuf[LINELEN];
+static int line;
+static int pos;
+
+/* Pointer to a diagnostic function.  */
+void (*diag) (const char *, ...) __attribute__ ((format (printf, 1, 2)))
+  = NULL;
+
+/* Custom diagnostics.  */
+static void __attribute__ ((format (printf, 1, 2)))
+bif_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", bif_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+
+static void __attribute__ ((format (printf, 1, 2)))
+ovld_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", ovld_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Add file support and functions for diagnostic support
@ 2020-06-17 20:04 William Schmidt
  0 siblings, 0 replies; 10+ messages in thread
From: William Schmidt @ 2020-06-17 20:04 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:cb2e25c534f33eadd95c37c9ba1fc61abb3944bd

commit cb2e25c534f33eadd95c37c9ba1fc61abb3944bd
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Wed Jun 17 09:52:26 2020 -0500

    rs6000: Add file support and functions for diagnostic support
    
    2020-06-17  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope
            variable.
            (ovld_file): Likewise.
            (header_file): Likewise.
            (init_file): Likewise.
            (defines_file): Likewise.
            (pgm_path): Likewise.
            (bif_path): Likewise.
            (ovld_path): Likewise.
            (header_path): Likewise.
            (init_path): Likewise.
            (defines_path): Likewise.
            (LINELEN): New defined constant.
            (linebuf): New filescope variable.
            (line): Likewise.
            (pos): Likewise.
            (diag): Likewise.
            (bif_diag): New function.
            (ovld_diag): New function.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 48 +++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index 1ef12aa0413..db7afa31f87 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -140,3 +140,51 @@ along with GCC; see the file COPYING3.  If not see
 #include <string.h>
 #include <assert.h>
 #include <unistd.h>
+
+/* Input and output file descriptors and pathnames.  */
+static FILE *bif_file;
+static FILE *ovld_file;
+static FILE *header_file;
+static FILE *init_file;
+static FILE *defines_file;
+
+static const char *pgm_path;
+static const char *bif_path;
+static const char *ovld_path;
+static const char *header_path;
+static const char *init_path;
+static const char *defines_path;
+
+/* Position information.  Note that "pos" is zero-indexed, but users
+   expect one-indexed column information, so representations of "pos"
+   as columns in diagnostic messages must be adjusted.  */
+#define LINELEN 1024
+static char linebuf[LINELEN];
+static int line;
+static int pos;
+
+/* Pointer to a diagnostic function.  */
+void (*diag) (const char *, ...) __attribute__ ((format (printf, 1, 2)))
+  = NULL;
+
+/* Custom diagnostics.  */
+static void __attribute__ ((format (printf, 1, 2)))
+bif_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", bif_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+
+static void __attribute__ ((format (printf, 1, 2)))
+ovld_diag (const char * fmt, ...)
+{
+  va_list args;
+  fprintf (stderr, "%s:%d: ", ovld_path, line);
+  va_start (args, fmt);
+  vfprintf (stderr, fmt, args);
+  va_end (args);
+}
+


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-29 19:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 21:28 [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Add file support and functions for diagnostic support William Schmidt
  -- strict thread matches above, loose matches on Subject: below --
2020-10-29 19:49 William Schmidt
2020-10-27 16:27 William Schmidt
2020-09-14 13:57 William Schmidt
2020-08-28 20:06 William Schmidt
2020-08-20 16:37 William Schmidt
2020-08-18 18:43 William Schmidt
2020-07-27 18:46 William Schmidt
2020-07-17 17:21 William Schmidt
2020-06-17 20:04 William Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).