Commit bb933490 by Richard Sandiford Committed by Richard Sandiford

Makefile.in (build/read-md.o): Depend on errors.h.

gcc/
	* Makefile.in (build/read-md.o): Depend on errors.h.
	* read-md.h (error_with_line): Declare.
	* read-md.c: Include errors.h.
	(message_with_line_1): New function, extracted from...
	(message_with_line): ...here.
	(error_with_line): New function.
	* genattrtab.c: If a call to message_with_line is followed by
	"have_error = 1;", replace both statements with a call to
	error_with_line.
	* genoutput.c: Likewise.
	* genpreds.c: Likewise.
	* genrecog.c: If a call to message_with_line is followed by
	"error_count++;", replace both statements with a call to
	error_with_line.
	(errorcount): Delete.
	(main): Don't check it.
	* gensupport.c: If a call to message_with_line is followed by
	"errors = 1;", replace both statements with a call to error_with_line.
	(errors): Delete.
	(process_define_cond_exec): Check have_error instead of errors.
	(init_md_reader_args_cb): Likewise.  Don't set errors.

From-SVN: r160573
parent c5e88b39
2010-06-10 Richard Sandiford <rdsandiford@googlemail.com> 2010-06-10 Richard Sandiford <rdsandiford@googlemail.com>
* Makefile.in (build/read-md.o): Depend on errors.h.
* read-md.h (error_with_line): Declare.
* read-md.c: Include errors.h.
(message_with_line_1): New function, extracted from...
(message_with_line): ...here.
(error_with_line): New function.
* genattrtab.c: If a call to message_with_line is followed by
"have_error = 1;", replace both statements with a call to
error_with_line.
* genoutput.c: Likewise.
* genpreds.c: Likewise.
* genrecog.c: If a call to message_with_line is followed by
"error_count++;", replace both statements with a call to
error_with_line.
(errorcount): Delete.
(main): Don't check it.
* gensupport.c: If a call to message_with_line is followed by
"errors = 1;", replace both statements with a call to error_with_line.
(errors): Delete.
(process_define_cond_exec): Check have_error instead of errors.
(init_md_reader_args_cb): Likewise. Don't set errors.
2010-06-10 Richard Sandiford <rdsandiford@googlemail.com>
* read-md.h (read_md_file): Declare. * read-md.h (read_md_file): Declare.
(read_char, unread_char): New functions. (read_char, unread_char): New functions.
(fatal_with_file_and_line, fatal_expected_char, read_skip_spaces) (fatal_with_file_and_line, fatal_expected_char, read_skip_spaces)
......
...@@ -3775,7 +3775,7 @@ build/min-insn-modes.o : min-insn-modes.c $(BCONFIG_H) $(SYSTEM_H) \ ...@@ -3775,7 +3775,7 @@ build/min-insn-modes.o : min-insn-modes.c $(BCONFIG_H) $(SYSTEM_H) \
build/print-rtl.o: print-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \ build/print-rtl.o: print-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
$(GTM_H) $(RTL_BASE_H) $(GTM_H) $(RTL_BASE_H)
build/read-md.o: read-md.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \ build/read-md.o: read-md.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
$(HASHTAB_H) $(READ_MD_H) $(HASHTAB_H) errors.h $(READ_MD_H)
build/read-rtl.o: read-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \ build/read-rtl.o: read-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
$(GTM_H) $(RTL_BASE_H) $(OBSTACK_H) $(HASHTAB_H) $(READ_MD_H) \ $(GTM_H) $(RTL_BASE_H) $(OBSTACK_H) $(HASHTAB_H) $(READ_MD_H) \
gensupport.h gensupport.h
......
...@@ -886,19 +886,17 @@ check_attr_value (rtx exp, struct attr_desc *attr) ...@@ -886,19 +886,17 @@ check_attr_value (rtx exp, struct attr_desc *attr)
case CONST_INT: case CONST_INT:
if (attr && ! attr->is_numeric) if (attr && ! attr->is_numeric)
{ {
message_with_line (attr->lineno, error_with_line (attr->lineno,
"CONST_INT not valid for non-numeric attribute %s", "CONST_INT not valid for non-numeric attribute %s",
attr->name); attr->name);
have_error = 1;
break; break;
} }
if (INTVAL (exp) < 0) if (INTVAL (exp) < 0)
{ {
message_with_line (attr->lineno, error_with_line (attr->lineno,
"negative numeric value specified for attribute %s", "negative numeric value specified for attribute %s",
attr->name); attr->name);
have_error = 1;
break; break;
} }
break; break;
...@@ -913,10 +911,9 @@ check_attr_value (rtx exp, struct attr_desc *attr) ...@@ -913,10 +911,9 @@ check_attr_value (rtx exp, struct attr_desc *attr)
for (; *p; p++) for (; *p; p++)
if (! ISDIGIT (*p)) if (! ISDIGIT (*p))
{ {
message_with_line (attr ? attr->lineno : 0, error_with_line (attr ? attr->lineno : 0,
"non-numeric value for numeric attribute %s", "non-numeric value for numeric attribute %s",
attr ? attr->name : "internal"); attr ? attr->name : "internal");
have_error = 1;
break; break;
} }
break; break;
...@@ -928,12 +925,9 @@ check_attr_value (rtx exp, struct attr_desc *attr) ...@@ -928,12 +925,9 @@ check_attr_value (rtx exp, struct attr_desc *attr)
break; break;
if (av == NULL) if (av == NULL)
{ error_with_line (attr->lineno,
message_with_line (attr->lineno, "unknown value `%s' for `%s' attribute",
"unknown value `%s' for `%s' attribute", XSTR (exp, 0), attr ? attr->name : "internal");
XSTR (exp, 0), attr ? attr->name : "internal");
have_error = 1;
}
break; break;
case IF_THEN_ELSE: case IF_THEN_ELSE:
...@@ -951,10 +945,9 @@ check_attr_value (rtx exp, struct attr_desc *attr) ...@@ -951,10 +945,9 @@ check_attr_value (rtx exp, struct attr_desc *attr)
case MOD: case MOD:
if (attr && !attr->is_numeric) if (attr && !attr->is_numeric)
{ {
message_with_line (attr->lineno, error_with_line (attr->lineno,
"invalid operation `%s' for non-numeric attribute value", "invalid operation `%s' for non-numeric"
GET_RTX_NAME (GET_CODE (exp))); " attribute value", GET_RTX_NAME (GET_CODE (exp)));
have_error = 1;
break; break;
} }
/* Fall through. */ /* Fall through. */
...@@ -977,9 +970,8 @@ check_attr_value (rtx exp, struct attr_desc *attr) ...@@ -977,9 +970,8 @@ check_attr_value (rtx exp, struct attr_desc *attr)
case COND: case COND:
if (XVECLEN (exp, 0) % 2 != 0) if (XVECLEN (exp, 0) % 2 != 0)
{ {
message_with_line (attr->lineno, error_with_line (attr->lineno,
"first operand of COND must have even length"); "first operand of COND must have even length");
have_error = 1;
break; break;
} }
...@@ -999,27 +991,18 @@ check_attr_value (rtx exp, struct attr_desc *attr) ...@@ -999,27 +991,18 @@ check_attr_value (rtx exp, struct attr_desc *attr)
{ {
struct attr_desc *attr2 = find_attr (&XSTR (exp, 0), 0); struct attr_desc *attr2 = find_attr (&XSTR (exp, 0), 0);
if (attr2 == NULL) if (attr2 == NULL)
{ error_with_line (attr ? attr->lineno : 0,
message_with_line (attr ? attr->lineno : 0, "unknown attribute `%s' in ATTR",
"unknown attribute `%s' in ATTR", XSTR (exp, 0));
XSTR (exp, 0));
have_error = 1;
}
else if (attr && attr->is_const && ! attr2->is_const) else if (attr && attr->is_const && ! attr2->is_const)
{ error_with_line (attr->lineno,
message_with_line (attr->lineno, "non-constant attribute `%s' referenced from `%s'",
"non-constant attribute `%s' referenced from `%s'", XSTR (exp, 0), attr->name);
XSTR (exp, 0), attr->name);
have_error = 1;
}
else if (attr else if (attr
&& attr->is_numeric != attr2->is_numeric) && attr->is_numeric != attr2->is_numeric)
{ error_with_line (attr->lineno,
message_with_line (attr->lineno, "numeric attribute mismatch calling `%s' from `%s'",
"numeric attribute mismatch calling `%s' from `%s'", XSTR (exp, 0), attr->name);
XSTR (exp, 0), attr->name);
have_error = 1;
}
} }
break; break;
...@@ -1030,10 +1013,9 @@ check_attr_value (rtx exp, struct attr_desc *attr) ...@@ -1030,10 +1013,9 @@ check_attr_value (rtx exp, struct attr_desc *attr)
return attr_rtx (SYMBOL_REF, XSTR (exp, 0)); return attr_rtx (SYMBOL_REF, XSTR (exp, 0));
default: default:
message_with_line (attr ? attr->lineno : 0, error_with_line (attr ? attr->lineno : 0,
"invalid operation `%s' for attribute value", "invalid operation `%s' for attribute value",
GET_RTX_NAME (GET_CODE (exp))); GET_RTX_NAME (GET_CODE (exp)));
have_error = 1;
break; break;
} }
...@@ -1052,9 +1034,8 @@ convert_set_attr_alternative (rtx exp, struct insn_def *id) ...@@ -1052,9 +1034,8 @@ convert_set_attr_alternative (rtx exp, struct insn_def *id)
if (XVECLEN (exp, 1) != num_alt) if (XVECLEN (exp, 1) != num_alt)
{ {
message_with_line (id->lineno, error_with_line (id->lineno,
"bad number of entries in SET_ATTR_ALTERNATIVE"); "bad number of entries in SET_ATTR_ALTERNATIVE");
have_error = 1;
return NULL_RTX; return NULL_RTX;
} }
...@@ -1133,8 +1114,7 @@ check_defs (void) ...@@ -1133,8 +1114,7 @@ check_defs (void)
case SET: case SET:
if (GET_CODE (XEXP (value, 0)) != ATTR) if (GET_CODE (XEXP (value, 0)) != ATTR)
{ {
message_with_line (id->lineno, "bad attribute set"); error_with_line (id->lineno, "bad attribute set");
have_error = 1;
value = NULL_RTX; value = NULL_RTX;
} }
break; break;
...@@ -1148,9 +1128,8 @@ check_defs (void) ...@@ -1148,9 +1128,8 @@ check_defs (void)
break; break;
default: default:
message_with_line (id->lineno, "invalid attribute code %s", error_with_line (id->lineno, "invalid attribute code %s",
GET_RTX_NAME (GET_CODE (value))); GET_RTX_NAME (GET_CODE (value)));
have_error = 1;
value = NULL_RTX; value = NULL_RTX;
} }
if (value == NULL_RTX) if (value == NULL_RTX)
...@@ -1158,9 +1137,8 @@ check_defs (void) ...@@ -1158,9 +1137,8 @@ check_defs (void)
if ((attr = find_attr (&XSTR (XEXP (value, 0), 0), 0)) == NULL) if ((attr = find_attr (&XSTR (XEXP (value, 0), 0), 0)) == NULL)
{ {
message_with_line (id->lineno, "unknown attribute %s", error_with_line (id->lineno, "unknown attribute %s",
XSTR (XEXP (value, 0), 0)); XSTR (XEXP (value, 0), 0));
have_error = 1;
continue; continue;
} }
...@@ -2937,10 +2915,9 @@ gen_attr (rtx exp, int lineno) ...@@ -2937,10 +2915,9 @@ gen_attr (rtx exp, int lineno)
attr = find_attr (&XSTR (exp, 0), 1); attr = find_attr (&XSTR (exp, 0), 1);
if (attr->default_val) if (attr->default_val)
{ {
message_with_line (lineno, "duplicate definition for attribute %s", error_with_line (lineno, "duplicate definition for attribute %s",
attr->name); attr->name);
message_with_line (attr->lineno, "previous definition"); message_with_line (attr->lineno, "previous definition");
have_error = 1;
return; return;
} }
attr->lineno = lineno; attr->lineno = lineno;
...@@ -2966,22 +2943,15 @@ gen_attr (rtx exp, int lineno) ...@@ -2966,22 +2943,15 @@ gen_attr (rtx exp, int lineno)
{ {
attr->is_const = 1; attr->is_const = 1;
if (attr->is_numeric) if (attr->is_numeric)
{ error_with_line (lineno,
message_with_line (lineno, "constant attributes may not take numeric values");
"constant attributes may not take numeric values");
have_error = 1;
}
/* Get rid of the CONST node. It is allowed only at top-level. */ /* Get rid of the CONST node. It is allowed only at top-level. */
XEXP (exp, 2) = XEXP (XEXP (exp, 2), 0); XEXP (exp, 2) = XEXP (XEXP (exp, 2), 0);
} }
if (! strcmp_check (attr->name, length_str) && ! attr->is_numeric) if (! strcmp_check (attr->name, length_str) && ! attr->is_numeric)
{ error_with_line (lineno, "`length' attribute must take numeric values");
message_with_line (lineno,
"`length' attribute must take numeric values");
have_error = 1;
}
/* Set up the default value. */ /* Set up the default value. */
XEXP (exp, 2) = check_attr_value (XEXP (exp, 2), attr); XEXP (exp, 2) = check_attr_value (XEXP (exp, 2), attr);
...@@ -3115,9 +3085,9 @@ gen_delay (rtx def, int lineno) ...@@ -3115,9 +3085,9 @@ gen_delay (rtx def, int lineno)
if (XVECLEN (def, 1) % 3 != 0) if (XVECLEN (def, 1) % 3 != 0)
{ {
message_with_line (lineno, error_with_line (lineno,
"number of elements in DEFINE_DELAY must be multiple of three"); "number of elements in DEFINE_DELAY must"
have_error = 1; " be multiple of three");
return; return;
} }
......
...@@ -446,17 +446,11 @@ scan_operands (struct data *d, rtx part, int this_address_p, ...@@ -446,17 +446,11 @@ scan_operands (struct data *d, rtx part, int this_address_p,
max_opno = opno; max_opno = opno;
if (max_opno >= MAX_MAX_OPERANDS) if (max_opno >= MAX_MAX_OPERANDS)
{ {
message_with_line (d->lineno, error_with_line (d->lineno, "maximum number of operands exceeded");
"maximum number of operands exceeded");
have_error = 1;
return; return;
} }
if (d->operand[opno].seen) if (d->operand[opno].seen)
{ error_with_line (d->lineno, "repeated operand number %d\n", opno);
message_with_line (d->lineno,
"repeated operand number %d\n", opno);
have_error = 1;
}
d->operand[opno].seen = 1; d->operand[opno].seen = 1;
d->operand[opno].mode = GET_MODE (part); d->operand[opno].mode = GET_MODE (part);
...@@ -475,17 +469,11 @@ scan_operands (struct data *d, rtx part, int this_address_p, ...@@ -475,17 +469,11 @@ scan_operands (struct data *d, rtx part, int this_address_p,
max_opno = opno; max_opno = opno;
if (max_opno >= MAX_MAX_OPERANDS) if (max_opno >= MAX_MAX_OPERANDS)
{ {
message_with_line (d->lineno, error_with_line (d->lineno, "maximum number of operands exceeded");
"maximum number of operands exceeded");
have_error = 1;
return; return;
} }
if (d->operand[opno].seen) if (d->operand[opno].seen)
{ error_with_line (d->lineno, "repeated operand number %d\n", opno);
message_with_line (d->lineno,
"repeated operand number %d\n", opno);
have_error = 1;
}
d->operand[opno].seen = 1; d->operand[opno].seen = 1;
d->operand[opno].mode = GET_MODE (part); d->operand[opno].mode = GET_MODE (part);
...@@ -505,17 +493,11 @@ scan_operands (struct data *d, rtx part, int this_address_p, ...@@ -505,17 +493,11 @@ scan_operands (struct data *d, rtx part, int this_address_p,
max_opno = opno; max_opno = opno;
if (max_opno >= MAX_MAX_OPERANDS) if (max_opno >= MAX_MAX_OPERANDS)
{ {
message_with_line (d->lineno, error_with_line (d->lineno, "maximum number of operands exceeded");
"maximum number of operands exceeded");
have_error = 1;
return; return;
} }
if (d->operand[opno].seen) if (d->operand[opno].seen)
{ error_with_line (d->lineno, "repeated operand number %d\n", opno);
message_with_line (d->lineno,
"repeated operand number %d\n", opno);
have_error = 1;
}
d->operand[opno].seen = 1; d->operand[opno].seen = 1;
d->operand[opno].mode = GET_MODE (part); d->operand[opno].mode = GET_MODE (part);
...@@ -717,11 +699,8 @@ process_template (struct data *d, const char *template_code) ...@@ -717,11 +699,8 @@ process_template (struct data *d, const char *template_code)
message_with_line (d->lineno, message_with_line (d->lineno,
"'@' is redundant for output template with single alternative"); "'@' is redundant for output template with single alternative");
if (i != d->n_alternatives) if (i != d->n_alternatives)
{ error_with_line (d->lineno,
message_with_line (d->lineno, "wrong number of alternatives in the output template");
"wrong number of alternatives in the output template");
have_error = 1;
}
printf ("};\n"); printf ("};\n");
} }
...@@ -770,11 +749,11 @@ validate_insn_alternatives (struct data *d) ...@@ -770,11 +749,11 @@ validate_insn_alternatives (struct data *d)
if (len < 1 || (len > 1 && strchr (",#*+=&%!0123456789", c))) if (len < 1 || (len > 1 && strchr (",#*+=&%!0123456789", c)))
{ {
message_with_line (d->lineno, error_with_line (d->lineno,
"invalid length %d for char '%c' in alternative %d of operand %d", "invalid length %d for char '%c' in"
len, c, which_alternative, start); " alternative %d of operand %d",
len, c, which_alternative, start);
len = 1; len = 1;
have_error = 1;
} }
#endif #endif
...@@ -787,30 +766,28 @@ validate_insn_alternatives (struct data *d) ...@@ -787,30 +766,28 @@ validate_insn_alternatives (struct data *d)
for (i = 1; i < len; i++) for (i = 1; i < len; i++)
if (p[i] == '\0') if (p[i] == '\0')
{ {
message_with_line (d->lineno, error_with_line (d->lineno,
"NUL in alternative %d of operand %d", "NUL in alternative %d of operand %d",
which_alternative, start); which_alternative, start);
alternative_count_unsure = 1; alternative_count_unsure = 1;
break; break;
} }
else if (strchr (",#*", p[i])) else if (strchr (",#*", p[i]))
{ {
message_with_line (d->lineno, error_with_line (d->lineno,
"'%c' in alternative %d of operand %d", "'%c' in alternative %d of operand %d",
p[i], which_alternative, start); p[i], which_alternative, start);
alternative_count_unsure = 1; alternative_count_unsure = 1;
} }
} }
if (alternative_count_unsure) if (!alternative_count_unsure)
have_error = 1;
else if (n == 0)
n = d->operand[start].n_alternatives;
else if (n != d->operand[start].n_alternatives)
{ {
message_with_line (d->lineno, if (n == 0)
n = d->operand[start].n_alternatives;
else if (n != d->operand[start].n_alternatives)
error_with_line (d->lineno,
"wrong number of alternatives in operand %d", "wrong number of alternatives in operand %d",
start); start);
have_error = 1;
} }
} }
...@@ -827,10 +804,7 @@ validate_insn_operands (struct data *d) ...@@ -827,10 +804,7 @@ validate_insn_operands (struct data *d)
for (i = 0; i < d->n_operands; ++i) for (i = 0; i < d->n_operands; ++i)
if (d->operand[i].seen == 0) if (d->operand[i].seen == 0)
{ error_with_line (d->lineno, "missing operand %d", i);
message_with_line (d->lineno, "missing operand %d", i);
have_error = 1;
}
} }
static void static void
...@@ -1148,13 +1122,12 @@ note_constraint (rtx exp, int lineno) ...@@ -1148,13 +1122,12 @@ note_constraint (rtx exp, int lineno)
if (strchr (indep_constraints, name[0]) && name[0] != 'm') if (strchr (indep_constraints, name[0]) && name[0] != 'm')
{ {
if (name[1] == '\0') if (name[1] == '\0')
message_with_line (lineno, "constraint letter '%s' cannot be " error_with_line (lineno, "constraint letter '%s' cannot be "
"redefined by the machine description", name); "redefined by the machine description", name);
else else
message_with_line (lineno, "constraint name '%s' cannot be defined by " error_with_line (lineno, "constraint name '%s' cannot be defined by "
"the machine description, as it begins with '%c'", "the machine description, as it begins with '%c'",
name, name[0]); name, name[0]);
have_error = 1;
return; return;
} }
...@@ -1171,25 +1144,22 @@ note_constraint (rtx exp, int lineno) ...@@ -1171,25 +1144,22 @@ note_constraint (rtx exp, int lineno)
if (!strcmp ((*iter)->name, name)) if (!strcmp ((*iter)->name, name))
{ {
message_with_line (lineno, "redefinition of constraint '%s'", name); error_with_line (lineno, "redefinition of constraint '%s'", name);
message_with_line ((*iter)->lineno, "previous definition is here"); message_with_line ((*iter)->lineno, "previous definition is here");
have_error = 1;
return; return;
} }
else if (!strncmp ((*iter)->name, name, (*iter)->namelen)) else if (!strncmp ((*iter)->name, name, (*iter)->namelen))
{ {
message_with_line (lineno, "defining constraint '%s' here", name); error_with_line (lineno, "defining constraint '%s' here", name);
message_with_line ((*iter)->lineno, "renders constraint '%s' " message_with_line ((*iter)->lineno, "renders constraint '%s' "
"(defined here) a prefix", (*iter)->name); "(defined here) a prefix", (*iter)->name);
have_error = 1;
return; return;
} }
else if (!strncmp ((*iter)->name, name, namelen)) else if (!strncmp ((*iter)->name, name, namelen))
{ {
message_with_line (lineno, "constraint '%s' is a prefix", name); error_with_line (lineno, "constraint '%s' is a prefix", name);
message_with_line ((*iter)->lineno, "of constraint '%s' " message_with_line ((*iter)->lineno, "of constraint '%s' "
"(defined here)", (*iter)->name); "(defined here)", (*iter)->name);
have_error = 1;
return; return;
} }
} }
...@@ -1217,11 +1187,10 @@ mdep_constraint_len (const char *s, int lineno, int opno) ...@@ -1217,11 +1187,10 @@ mdep_constraint_len (const char *s, int lineno, int opno)
if (!strncmp (s, p->name, p->namelen)) if (!strncmp (s, p->name, p->namelen))
return p->namelen; return p->namelen;
message_with_line (lineno, error_with_line (lineno,
"error: undefined machine-specific constraint " "error: undefined machine-specific constraint "
"at this point: \"%s\"", s); "at this point: \"%s\"", s);
message_with_line (lineno, "note: in operand %d", opno); message_with_line (lineno, "note: in operand %d", opno);
have_error = 1;
return 1; /* safe */ return 1; /* safe */
} }
......
...@@ -67,9 +67,8 @@ validate_exp (rtx exp, const char *name, int lineno) ...@@ -67,9 +67,8 @@ validate_exp (rtx exp, const char *name, int lineno)
{ {
if (!ISDIGIT (*p) && !ISLOWER (*p)) if (!ISDIGIT (*p) && !ISLOWER (*p))
{ {
message_with_line (lineno, "%s: invalid character in path " error_with_line (lineno, "%s: invalid character in path "
"string '%s'", name, XSTR (exp, 1)); "string '%s'", name, XSTR (exp, 1));
have_error = 1;
return true; return true;
} }
} }
...@@ -82,10 +81,9 @@ validate_exp (rtx exp, const char *name, int lineno) ...@@ -82,10 +81,9 @@ validate_exp (rtx exp, const char *name, int lineno)
return false; return false;
default: default:
message_with_line (lineno, error_with_line (lineno,
"%s: cannot use '%s' in a predicate expression", "%s: cannot use '%s' in a predicate expression",
name, GET_RTX_NAME (GET_CODE (exp))); name, GET_RTX_NAME (GET_CODE (exp)));
have_error = 1;
return true; return true;
} }
} }
...@@ -119,10 +117,9 @@ process_define_predicate (rtx defn, int lineno) ...@@ -119,10 +117,9 @@ process_define_predicate (rtx defn, int lineno)
return; return;
bad_name: bad_name:
message_with_line (lineno, error_with_line (lineno,
"%s: predicate name must be a valid C function name", "%s: predicate name must be a valid C function name",
XSTR (defn, 0)); XSTR (defn, 0));
have_error = 1;
return; return;
} }
...@@ -765,12 +762,11 @@ add_constraint (const char *name, const char *regclass, ...@@ -765,12 +762,11 @@ add_constraint (const char *name, const char *regclass,
if (!ISALPHA (name[0]) && name[0] != '_') if (!ISALPHA (name[0]) && name[0] != '_')
{ {
if (name[1] == '\0') if (name[1] == '\0')
message_with_line (lineno, "constraint name '%s' is not " error_with_line (lineno, "constraint name '%s' is not "
"a letter or underscore", name); "a letter or underscore", name);
else else
message_with_line (lineno, "constraint name '%s' does not begin " error_with_line (lineno, "constraint name '%s' does not begin "
"with a letter or underscore", name); "with a letter or underscore", name);
have_error = 1;
return; return;
} }
for (p = name; *p; p++) for (p = name; *p; p++)
...@@ -780,11 +776,10 @@ add_constraint (const char *name, const char *regclass, ...@@ -780,11 +776,10 @@ add_constraint (const char *name, const char *regclass,
need_mangled_name = true; need_mangled_name = true;
else else
{ {
message_with_line (lineno, error_with_line (lineno,
"constraint name '%s' must be composed of " "constraint name '%s' must be composed of "
"letters, digits, underscores, and " "letters, digits, underscores, and "
"angle brackets", name); "angle brackets", name);
have_error = 1;
return; return;
} }
} }
...@@ -792,13 +787,12 @@ add_constraint (const char *name, const char *regclass, ...@@ -792,13 +787,12 @@ add_constraint (const char *name, const char *regclass,
if (strchr (generic_constraint_letters, name[0])) if (strchr (generic_constraint_letters, name[0]))
{ {
if (name[1] == '\0') if (name[1] == '\0')
message_with_line (lineno, "constraint letter '%s' cannot be " error_with_line (lineno, "constraint letter '%s' cannot be "
"redefined by the machine description", name); "redefined by the machine description", name);
else else
message_with_line (lineno, "constraint name '%s' cannot be defined by " error_with_line (lineno, "constraint name '%s' cannot be defined by "
"the machine description, as it begins with '%c'", "the machine description, as it begins with '%c'",
name, name[0]); name, name[0]);
have_error = 1;
return; return;
} }
...@@ -817,25 +811,22 @@ add_constraint (const char *name, const char *regclass, ...@@ -817,25 +811,22 @@ add_constraint (const char *name, const char *regclass,
if (!strcmp ((*iter)->name, name)) if (!strcmp ((*iter)->name, name))
{ {
message_with_line (lineno, "redefinition of constraint '%s'", name); error_with_line (lineno, "redefinition of constraint '%s'", name);
message_with_line ((*iter)->lineno, "previous definition is here"); message_with_line ((*iter)->lineno, "previous definition is here");
have_error = 1;
return; return;
} }
else if (!strncmp ((*iter)->name, name, (*iter)->namelen)) else if (!strncmp ((*iter)->name, name, (*iter)->namelen))
{ {
message_with_line (lineno, "defining constraint '%s' here", name); error_with_line (lineno, "defining constraint '%s' here", name);
message_with_line ((*iter)->lineno, "renders constraint '%s' " message_with_line ((*iter)->lineno, "renders constraint '%s' "
"(defined here) a prefix", (*iter)->name); "(defined here) a prefix", (*iter)->name);
have_error = 1;
return; return;
} }
else if (!strncmp ((*iter)->name, name, namelen)) else if (!strncmp ((*iter)->name, name, namelen))
{ {
message_with_line (lineno, "constraint '%s' is a prefix", name); error_with_line (lineno, "constraint '%s' is a prefix", name);
message_with_line ((*iter)->lineno, "of constraint '%s' " message_with_line ((*iter)->lineno, "of constraint '%s' "
"(defined here)", (*iter)->name); "(defined here)", (*iter)->name);
have_error = 1;
return; return;
} }
} }
...@@ -856,43 +847,36 @@ add_constraint (const char *name, const char *regclass, ...@@ -856,43 +847,36 @@ add_constraint (const char *name, const char *regclass,
GET_RTX_NAME (appropriate_code))) GET_RTX_NAME (appropriate_code)))
{ {
if (name[1] == '\0') if (name[1] == '\0')
message_with_line (lineno, "constraint letter '%c' is reserved " error_with_line (lineno, "constraint letter '%c' is reserved "
"for %s constraints", "for %s constraints",
name[0], GET_RTX_NAME (appropriate_code)); name[0], GET_RTX_NAME (appropriate_code));
else else
message_with_line (lineno, "constraint names beginning with '%c' " error_with_line (lineno, "constraint names beginning with '%c' "
"(%s) are reserved for %s constraints", "(%s) are reserved for %s constraints",
name[0], name, name[0], name, GET_RTX_NAME (appropriate_code));
GET_RTX_NAME (appropriate_code));
have_error = 1;
return; return;
} }
if (is_memory) if (is_memory)
{ {
if (name[1] == '\0') if (name[1] == '\0')
message_with_line (lineno, "constraint letter '%c' cannot be a " error_with_line (lineno, "constraint letter '%c' cannot be a "
"memory constraint", name[0]); "memory constraint", name[0]);
else else
message_with_line (lineno, "constraint name '%s' begins with '%c', " error_with_line (lineno, "constraint name '%s' begins with '%c', "
"and therefore cannot be a memory constraint", "and therefore cannot be a memory constraint",
name, name[0]); name, name[0]);
have_error = 1;
return; return;
} }
else if (is_address) else if (is_address)
{ {
if (name[1] == '\0') if (name[1] == '\0')
message_with_line (lineno, "constraint letter '%c' cannot be a " error_with_line (lineno, "constraint letter '%c' cannot be a "
"memory constraint", name[0]); "memory constraint", name[0]);
else else
message_with_line (lineno, "constraint name '%s' begins with '%c', " error_with_line (lineno, "constraint name '%s' begins with '%c', "
"and therefore cannot be a memory constraint", "and therefore cannot be a memory constraint",
name, name[0]); name, name[0]);
have_error = 1;
return; return;
} }
} }
......
...@@ -170,9 +170,6 @@ static int max_depth; ...@@ -170,9 +170,6 @@ static int max_depth;
/* The line number of the start of the pattern currently being processed. */ /* The line number of the start of the pattern currently being processed. */
static int pattern_lineno; static int pattern_lineno;
/* Count of errors. */
static int error_count;
/* Predicate handling. /* Predicate handling.
...@@ -289,8 +286,7 @@ compute_predicate_codes (rtx exp, char codes[NUM_RTX_CODE]) ...@@ -289,8 +286,7 @@ compute_predicate_codes (rtx exp, char codes[NUM_RTX_CODE])
if (*next_code == '\0') if (*next_code == '\0')
{ {
message_with_line (pattern_lineno, "empty match_code expression"); error_with_line (pattern_lineno, "empty match_code expression");
error_count++;
break; break;
} }
...@@ -309,9 +305,9 @@ compute_predicate_codes (rtx exp, char codes[NUM_RTX_CODE]) ...@@ -309,9 +305,9 @@ compute_predicate_codes (rtx exp, char codes[NUM_RTX_CODE])
} }
if (!found_it) if (!found_it)
{ {
message_with_line (pattern_lineno, "match_code \"%.*s\" matches nothing", error_with_line (pattern_lineno,
(int) n, code); "match_code \"%.*s\" matches nothing",
error_count ++; (int) n, code);
for (i = 0; i < NUM_RTX_CODE; i++) for (i = 0; i < NUM_RTX_CODE; i++)
if (!strncasecmp (code, GET_RTX_NAME (i), n) if (!strncasecmp (code, GET_RTX_NAME (i), n)
&& GET_RTX_NAME (i)[n] == '\0' && GET_RTX_NAME (i)[n] == '\0'
...@@ -333,10 +329,9 @@ compute_predicate_codes (rtx exp, char codes[NUM_RTX_CODE]) ...@@ -333,10 +329,9 @@ compute_predicate_codes (rtx exp, char codes[NUM_RTX_CODE])
struct pred_data *p = lookup_predicate (XSTR (exp, 1)); struct pred_data *p = lookup_predicate (XSTR (exp, 1));
if (!p) if (!p)
{ {
message_with_line (pattern_lineno, error_with_line (pattern_lineno,
"reference to unknown predicate '%s'", "reference to unknown predicate '%s'",
XSTR (exp, 1)); XSTR (exp, 1));
error_count++;
break; break;
} }
for (i = 0; i < NUM_RTX_CODE; i++) for (i = 0; i < NUM_RTX_CODE; i++)
...@@ -351,10 +346,9 @@ compute_predicate_codes (rtx exp, char codes[NUM_RTX_CODE]) ...@@ -351,10 +346,9 @@ compute_predicate_codes (rtx exp, char codes[NUM_RTX_CODE])
break; break;
default: default:
message_with_line (pattern_lineno, error_with_line (pattern_lineno,
"'%s' cannot be used in a define_predicate expression", "'%s' cannot be used in a define_predicate expression",
GET_RTX_NAME (GET_CODE (exp))); GET_RTX_NAME (GET_CODE (exp)));
error_count++;
memset (codes, I, NUM_RTX_CODE); memset (codes, I, NUM_RTX_CODE);
break; break;
} }
...@@ -634,12 +628,9 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code) ...@@ -634,12 +628,9 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code)
case MATCH_OP_DUP: case MATCH_OP_DUP:
case MATCH_PAR_DUP: case MATCH_PAR_DUP:
if (find_operand (insn, XINT (pattern, 0), pattern) == pattern) if (find_operand (insn, XINT (pattern, 0), pattern) == pattern)
{ error_with_line (pattern_lineno,
message_with_line (pattern_lineno, "operand %i duplicated before defined",
"operand %i duplicated before defined", XINT (pattern, 0));
XINT (pattern, 0));
error_count++;
}
break; break;
case MATCH_OPERAND: case MATCH_OPERAND:
case MATCH_OPERATOR: case MATCH_OPERATOR:
...@@ -695,20 +686,14 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code) ...@@ -695,20 +686,14 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code)
&& find_matching_operand (insn, XINT (pattern, 0))) && find_matching_operand (insn, XINT (pattern, 0)))
; ;
else else
{ error_with_line (pattern_lineno,
message_with_line (pattern_lineno, "operand %d missing in-out reload",
"operand %d missing in-out reload",
XINT (pattern, 0));
error_count++;
}
}
else if (constraints0 != '=' && constraints0 != '+')
{
message_with_line (pattern_lineno,
"operand %d missing output reload",
XINT (pattern, 0)); XINT (pattern, 0));
error_count++;
} }
else if (constraints0 != '=' && constraints0 != '+')
error_with_line (pattern_lineno,
"operand %d missing output reload",
XINT (pattern, 0));
} }
} }
...@@ -782,12 +767,9 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code) ...@@ -782,12 +767,9 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code)
/* The operands of a SET must have the same mode unless one /* The operands of a SET must have the same mode unless one
is VOIDmode. */ is VOIDmode. */
else if (dmode != VOIDmode && smode != VOIDmode && dmode != smode) else if (dmode != VOIDmode && smode != VOIDmode && dmode != smode)
{ error_with_line (pattern_lineno,
message_with_line (pattern_lineno, "mode mismatch in set: %smode vs %smode",
"mode mismatch in set: %smode vs %smode", GET_MODE_NAME (dmode), GET_MODE_NAME (smode));
GET_MODE_NAME (dmode), GET_MODE_NAME (smode));
error_count++;
}
/* If only one of the operands is VOIDmode, and PC or CC0 is /* If only one of the operands is VOIDmode, and PC or CC0 is
not involved, it's probably a mistake. */ not involved, it's probably a mistake. */
...@@ -828,12 +810,9 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code) ...@@ -828,12 +810,9 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code)
case LABEL_REF: case LABEL_REF:
if (GET_MODE (XEXP (pattern, 0)) != VOIDmode) if (GET_MODE (XEXP (pattern, 0)) != VOIDmode)
{ error_with_line (pattern_lineno,
message_with_line (pattern_lineno, "operand to label_ref %smode not VOIDmode",
"operand to label_ref %smode not VOIDmode", GET_MODE_NAME (GET_MODE (XEXP (pattern, 0))));
GET_MODE_NAME (GET_MODE (XEXP (pattern, 0))));
error_count++;
}
break; break;
default: default:
...@@ -1494,12 +1473,11 @@ merge_accept_insn (struct decision *oldd, struct decision *addd) ...@@ -1494,12 +1473,11 @@ merge_accept_insn (struct decision *oldd, struct decision *addd)
} }
else else
{ {
message_with_line (add->u.insn.lineno, "`%s' matches `%s'", error_with_line (add->u.insn.lineno, "`%s' matches `%s'",
get_insn_name (add->u.insn.code_number), get_insn_name (add->u.insn.code_number),
get_insn_name (old->u.insn.code_number)); get_insn_name (old->u.insn.code_number));
message_with_line (old->u.insn.lineno, "previous definition of `%s'", message_with_line (old->u.insn.lineno, "previous definition of `%s'",
get_insn_name (old->u.insn.code_number)); get_insn_name (old->u.insn.code_number));
error_count++;
} }
} }
...@@ -2771,7 +2749,7 @@ main (int argc, char **argv) ...@@ -2771,7 +2749,7 @@ main (int argc, char **argv)
} }
} }
if (error_count || have_error) if (have_error)
return FATAL_EXIT_CODE; return FATAL_EXIT_CODE;
puts ("\n\n"); puts ("\n\n");
......
...@@ -45,7 +45,6 @@ static struct obstack obstack; ...@@ -45,7 +45,6 @@ static struct obstack obstack;
struct obstack *rtl_obstack = &obstack; struct obstack *rtl_obstack = &obstack;
static int sequence_num; static int sequence_num;
static int errors;
static int predicable_default; static int predicable_default;
static const char *predicable_true; static const char *predicable_true;
...@@ -222,8 +221,7 @@ process_include (rtx desc, int lineno) ...@@ -222,8 +221,7 @@ process_include (rtx desc, int lineno)
if (input_file == NULL) if (input_file == NULL)
{ {
free (pathname); free (pathname);
message_with_line (lineno, "include file `%s' not found", filename); error_with_line (lineno, "include file `%s' not found", filename);
errors = 1;
return; return;
} }
success: success:
...@@ -369,9 +367,8 @@ is_predicable (struct queue_elem *elem) ...@@ -369,9 +367,8 @@ is_predicable (struct queue_elem *elem)
case SET_ATTR_ALTERNATIVE: case SET_ATTR_ALTERNATIVE:
if (strcmp (XSTR (sub, 0), "predicable") == 0) if (strcmp (XSTR (sub, 0), "predicable") == 0)
{ {
message_with_line (elem->lineno, error_with_line (elem->lineno,
"multiple alternatives for `predicable'"); "multiple alternatives for `predicable'");
errors = 1;
return 0; return 0;
} }
break; break;
...@@ -390,9 +387,8 @@ is_predicable (struct queue_elem *elem) ...@@ -390,9 +387,8 @@ is_predicable (struct queue_elem *elem)
/* ??? It would be possible to handle this if we really tried. /* ??? It would be possible to handle this if we really tried.
It's not easy though, and I'm not going to bother until it It's not easy though, and I'm not going to bother until it
really proves necessary. */ really proves necessary. */
message_with_line (elem->lineno, error_with_line (elem->lineno,
"non-constant value for `predicable'"); "non-constant value for `predicable'");
errors = 1;
return 0; return 0;
default: default:
...@@ -409,9 +405,7 @@ is_predicable (struct queue_elem *elem) ...@@ -409,9 +405,7 @@ is_predicable (struct queue_elem *elem)
to do this. Delay this until we've got the basics solid. */ to do this. Delay this until we've got the basics solid. */
if (strchr (value, ',') != NULL) if (strchr (value, ',') != NULL)
{ {
message_with_line (elem->lineno, error_with_line (elem->lineno, "multiple alternatives for `predicable'");
"multiple alternatives for `predicable'");
errors = 1;
return 0; return 0;
} }
...@@ -421,10 +415,8 @@ is_predicable (struct queue_elem *elem) ...@@ -421,10 +415,8 @@ is_predicable (struct queue_elem *elem)
if (strcmp (value, predicable_false) == 0) if (strcmp (value, predicable_false) == 0)
return 0; return 0;
message_with_line (elem->lineno, error_with_line (elem->lineno,
"unknown value `%s' for `predicable' attribute", "unknown value `%s' for `predicable' attribute", value);
value);
errors = 1;
return 0; return 0;
} }
...@@ -443,9 +435,8 @@ identify_predicable_attribute (void) ...@@ -443,9 +435,8 @@ identify_predicable_attribute (void)
if (strcmp (XSTR (elem->data, 0), "predicable") == 0) if (strcmp (XSTR (elem->data, 0), "predicable") == 0)
goto found; goto found;
message_with_line (define_cond_exec_queue->lineno, error_with_line (define_cond_exec_queue->lineno,
"attribute `predicable' not defined"); "attribute `predicable' not defined");
errors = 1;
return; return;
found: found:
...@@ -454,9 +445,7 @@ identify_predicable_attribute (void) ...@@ -454,9 +445,7 @@ identify_predicable_attribute (void)
p_true = strchr (p_false, ','); p_true = strchr (p_false, ',');
if (p_true == NULL || strchr (++p_true, ',') != NULL) if (p_true == NULL || strchr (++p_true, ',') != NULL)
{ {
message_with_line (elem->lineno, error_with_line (elem->lineno, "attribute `predicable' is not a boolean");
"attribute `predicable' is not a boolean");
errors = 1;
if (p_false) if (p_false)
free (p_false); free (p_false);
return; return;
...@@ -473,17 +462,14 @@ identify_predicable_attribute (void) ...@@ -473,17 +462,14 @@ identify_predicable_attribute (void)
break; break;
case CONST: case CONST:
message_with_line (elem->lineno, error_with_line (elem->lineno, "attribute `predicable' cannot be const");
"attribute `predicable' cannot be const");
errors = 1;
if (p_false) if (p_false)
free (p_false); free (p_false);
return; return;
default: default:
message_with_line (elem->lineno, error_with_line (elem->lineno,
"attribute `predicable' must have a constant default"); "attribute `predicable' must have a constant default");
errors = 1;
if (p_false) if (p_false)
free (p_false); free (p_false);
return; return;
...@@ -495,10 +481,8 @@ identify_predicable_attribute (void) ...@@ -495,10 +481,8 @@ identify_predicable_attribute (void)
predicable_default = 0; predicable_default = 0;
else else
{ {
message_with_line (elem->lineno, error_with_line (elem->lineno,
"unknown value `%s' for `predicable' attribute", "unknown value `%s' for `predicable' attribute", value);
value);
errors = 1;
if (p_false) if (p_false)
free (p_false); free (p_false);
} }
...@@ -592,10 +576,8 @@ alter_predicate_for_insn (rtx pattern, int alt, int max_op, int lineno) ...@@ -592,10 +576,8 @@ alter_predicate_for_insn (rtx pattern, int alt, int max_op, int lineno)
if (n_alternatives (c) != 1) if (n_alternatives (c) != 1)
{ {
message_with_line (lineno, error_with_line (lineno, "too many alternatives for operand %d",
"too many alternatives for operand %d", XINT (pattern, 0));
XINT (pattern, 0));
errors = 1;
return NULL; return NULL;
} }
...@@ -783,9 +765,7 @@ process_one_cond_exec (struct queue_elem *ce_elem) ...@@ -783,9 +765,7 @@ process_one_cond_exec (struct queue_elem *ce_elem)
if (XVECLEN (ce_elem->data, 0) != 1) if (XVECLEN (ce_elem->data, 0) != 1)
{ {
message_with_line (ce_elem->lineno, error_with_line (ce_elem->lineno, "too many patterns in predicate");
"too many patterns in predicate");
errors = 1;
return; return;
} }
...@@ -882,7 +862,7 @@ process_define_cond_exec (void) ...@@ -882,7 +862,7 @@ process_define_cond_exec (void)
struct queue_elem *elem; struct queue_elem *elem;
identify_predicable_attribute (); identify_predicable_attribute ();
if (errors) if (have_error)
return; return;
for (elem = define_cond_exec_queue; elem ; elem = elem->next) for (elem = define_cond_exec_queue; elem ; elem = elem->next)
...@@ -972,7 +952,6 @@ init_md_reader_args_cb (int argc, char **argv, bool (*parse_opt)(const char *)) ...@@ -972,7 +952,6 @@ init_md_reader_args_cb (int argc, char **argv, bool (*parse_opt)(const char *))
condition_table = htab_create (500, hash_c_test, cmp_c_test, NULL); condition_table = htab_create (500, hash_c_test, cmp_c_test, NULL);
init_predicate_table (); init_predicate_table ();
obstack_init (rtl_obstack); obstack_init (rtl_obstack);
errors = 0;
sequence_num = 0; sequence_num = 0;
no_more_options = false; no_more_options = false;
already_read_stdin = false; already_read_stdin = false;
...@@ -1052,7 +1031,7 @@ init_md_reader_args_cb (int argc, char **argv, bool (*parse_opt)(const char *)) ...@@ -1052,7 +1031,7 @@ init_md_reader_args_cb (int argc, char **argv, bool (*parse_opt)(const char *))
if (define_cond_exec_queue != NULL) if (define_cond_exec_queue != NULL)
process_define_cond_exec (); process_define_cond_exec ();
return errors ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE; return have_error ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE;
} }
/* Programs that don't have their own options can use this entry point /* Programs that don't have their own options can use this entry point
......
...@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "hashtab.h" #include "hashtab.h"
#include "errors.h"
#include "read-md.h" #include "read-md.h"
/* Associates PTR (which can be a string, etc.) with the file location /* Associates PTR (which can be a string, etc.) with the file location
...@@ -174,6 +175,17 @@ print_c_condition (const char *cond) ...@@ -174,6 +175,17 @@ print_c_condition (const char *cond)
} }
} }
/* A vfprintf-like function for reporting an error against line LINENO
of the current MD file. */
static void ATTRIBUTE_PRINTF(2,0)
message_with_line_1 (int lineno, const char *msg, va_list ap)
{
fprintf (stderr, "%s:%d: ", read_md_filename, lineno);
vfprintf (stderr, msg, ap);
fputc ('\n', stderr);
}
/* A printf-like function for reporting an error against line LINENO /* A printf-like function for reporting an error against line LINENO
in the current MD file. */ in the current MD file. */
...@@ -183,12 +195,21 @@ message_with_line (int lineno, const char *msg, ...) ...@@ -183,12 +195,21 @@ message_with_line (int lineno, const char *msg, ...)
va_list ap; va_list ap;
va_start (ap, msg); va_start (ap, msg);
message_with_line_1 (lineno, msg, ap);
va_end (ap);
}
fprintf (stderr, "%s:%d: ", read_md_filename, lineno); /* Like message_with_line, but treat the condition as an error. */
vfprintf (stderr, msg, ap);
fputc ('\n', stderr); void
error_with_line (int lineno, const char *msg, ...)
{
va_list ap;
va_start (ap, msg);
message_with_line_1 (lineno, msg, ap);
va_end (ap); va_end (ap);
have_error = 1;
} }
/* A printf-like function for reporting an error against the current /* A printf-like function for reporting an error against the current
......
...@@ -47,6 +47,7 @@ extern void print_md_ptr_loc (const void *); ...@@ -47,6 +47,7 @@ extern void print_md_ptr_loc (const void *);
extern const char *join_c_conditions (const char *, const char *); extern const char *join_c_conditions (const char *, const char *);
extern void print_c_condition (const char *); extern void print_c_condition (const char *);
extern void message_with_line (int, const char *, ...) ATTRIBUTE_PRINTF_2; extern void message_with_line (int, const char *, ...) ATTRIBUTE_PRINTF_2;
extern void error_with_line (int, const char *, ...) ATTRIBUTE_PRINTF_2;
extern void fatal_with_file_and_line (const char *, ...) extern void fatal_with_file_and_line (const char *, ...)
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
extern void fatal_expected_char (int, int) ATTRIBUTE_NORETURN; extern void fatal_expected_char (int, int) ATTRIBUTE_NORETURN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment