#undef FLOAT /* This is for hpux. They should change hpux. */
#undef FFS /* Some systems define this in param.h. */
#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
#include "tree.h"
#include "tm_p.h"
#include "flags.h"
#include "langhooks.h"
#include "langhooks-def.h"
-#define output_formatted_integer(BUFFER, FORMAT, INTEGER) \
- do \
- { \
- sprintf ((BUFFER)->digit_buffer, FORMAT, INTEGER); \
- output_add_string (BUFFER, (BUFFER)->digit_buffer); \
- } \
- while (0)
-
#define output_text_length(BUFFER) (BUFFER)->line_length
#define is_starting_newline(BUFFER) (output_text_length (BUFFER) == 0)
#define line_wrap_cutoff(BUFFER) (BUFFER)->state.maximum_length
output_buffer *buffer;
int i;
{
- output_formatted_integer (buffer, "%d", i);
+ output_formatted_scalar (buffer, "%d", i);
}
static void
output_buffer *buffer;
long int i;
{
- output_formatted_integer (buffer, "%ld", i);
+ output_formatted_scalar (buffer, "%ld", i);
}
static void
output_buffer *buffer;
unsigned int i;
{
- output_formatted_integer (buffer, "%u", i);
+ output_formatted_scalar (buffer, "%u", i);
}
static void
output_buffer *buffer;
long unsigned int i;
{
- output_formatted_integer (buffer, "%lu", i);
+ output_formatted_scalar (buffer, "%lu", i);
}
static void
output_buffer *buffer;
unsigned int i;
{
- output_formatted_integer (buffer, "%o", i);
+ output_formatted_scalar (buffer, "%o", i);
}
static void
output_buffer *buffer;
unsigned long int i;
{
- output_formatted_integer (buffer, "%lo", i);
+ output_formatted_scalar (buffer, "%lo", i);
}
static void
output_buffer *buffer;
unsigned int i;
{
- output_formatted_integer (buffer, "%x", i);
+ output_formatted_scalar (buffer, "%x", i);
}
static void
output_buffer *buffer;
unsigned long int i;
{
- output_formatted_integer (buffer, "%lx", i);
+ output_formatted_scalar (buffer, "%lx", i);
}
/* Append to BUFFER a string specified by its STARTING character
maybe_wrap_text (buffer, str, str + (str ? strlen (str) : 0));
}
+/* Append an identifier ID to BUFFER. */
+void
+output_add_identifier (buffer, id)
+ output_buffer *buffer;
+ tree id;
+{
+ output_append (buffer, IDENTIFIER_POINTER (id),
+ IDENTIFIER_POINTER (id) + IDENTIFIER_LENGTH (id));
+}
+
/* Flush the content of BUFFER onto the attached stream,
and reinitialize. */
return str;
}
-/* Same as diagnsotic_build_prefix, but only the source FILE is given. */
+/* Same as diagnostic_build_prefix, but only the source FILE is given. */
char *
file_name_as_prefix (f)
const char *f;
{
diagnostic->message.format_spec = msgid;
diagnostic->message.args_ptr = args;
- /* If the diagnostic message doesn't specify a loccation,
+ /* If the diagnostic message doesn't specify a location,
use FILE and LINE. */
if (!text_specifies_location (&diagnostic->message, &diagnostic->location))
{
output_set_prefix
(&global_dc->buffer, diagnostic_build_prefix (&diagnostic));
- output_printf (&global_dc->buffer, "sorry, not implemented: ");
output_format (&global_dc->buffer, &diagnostic.message);
output_flush (&global_dc->buffer);
VA_CLOSE (ap);
fnotice (stderr,
"Please submit a full bug report,\n\
with preprocessed source if appropriate.\n\
-See %s for instructions.\n", GCCBUGURL);
+See %s for instructions.\n", bug_report_url);
exit (FATAL_EXIT_CODE);
}
fnotice (stderr,
"Please submit a full bug report,\n\
with preprocessed source if appropriate.\n\
-See %s for instructions.\n", GCCBUGURL);
+See %s for instructions.\n", bug_report_url);
exit (FATAL_EXIT_CODE);
}
int line;
const char *function;
{
- internal_error ("Internal compiler error in %s, at %s:%d",
- function, trim_filename (file), line);
+ internal_error ("in %s, at %s:%d", function, trim_filename (file), line);
}
void
}
void
+inform VPARAMS ((const char *msgid, ...))
+{
+ diagnostic_info diagnostic;
+
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
+
+ diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno,
+ DK_NOTE);
+ report_diagnostic (&diagnostic);
+ VA_CLOSE (ap);
+}
+
+void
warn_deprecated_use (node)
tree node;
{