summaryrefslogtreecommitdiff
path: root/gcc/diagnostic.h
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-29 08:26:45 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-29 08:26:45 +0000
commitb38e286c9b97107691417027ff2c6d784ab6bafd (patch)
tree2363601d56cb77885f5b17bf887c20e645e9de31 /gcc/diagnostic.h
parentd0290aea25c362bc831a294386e8c9010f5903ea (diff)
downloadgcc-b38e286c9b97107691417027ff2c6d784ab6bafd.tar.gz
* pretty-print.h: Define more macros.
* diagnostic.h (output_formatted_integer): Moved from... * diagnostic.c: ... here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55833 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/diagnostic.h')
-rw-r--r--gcc/diagnostic.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
index c4238df6aba..52d749acc48 100644
--- a/gcc/diagnostic.h
+++ b/gcc/diagnostic.h
@@ -160,6 +160,14 @@ struct output_buffer
/* True if BUFFER is in line-wrapping mode. */
#define output_is_line_wrapping(BUFFER) (output_line_cutoff (BUFFER) > 0)
+#define output_formatted_integer(BUFFER, FORMAT, INTEGER) \
+ do \
+ { \
+ sprintf ((BUFFER)->digit_buffer, FORMAT, INTEGER); \
+ output_add_string (BUFFER, (BUFFER)->digit_buffer); \
+ } \
+ while (0)
+
/* Forward declarations. */
typedef struct diagnostic_context diagnostic_context;
typedef void (*diagnostic_starter_fn) PARAMS ((diagnostic_context *,