A strict warning was given too often

This commit is contained in:
ceriel 1991-03-13 10:11:25 +00:00
parent 0a517b9256
commit 17266fb373
2 changed files with 6 additions and 2 deletions

View file

@ -79,6 +79,7 @@ do_decspecs(ds)
SIZE_ERROR:
error("%s with illegal type",symbol2str(ds->ds_size));
}
ds->ds_notypegiven = 0;
}
if (ds->ds_unsigned) {
register int ds_isunsigned = (ds->ds_unsigned == UNSIGNED);
@ -101,6 +102,7 @@ do_decspecs(ds)
error("%s with illegal type"
, symbol2str(ds->ds_unsigned));
}
ds->ds_notypegiven = 0;
}
ds->ds_type = qualifier_type(tp, ds->ds_typequal);
}

View file

@ -155,14 +155,16 @@ external_definition
[
function(&Ds, &Dc)
|
{ if (! Ds.ds_sc_given && Ds.ds_notypegiven) {
{ if (! Ds.ds_sc_given && ! Ds.ds_typequal &&
Ds.ds_notypegiven) {
strict("declaration specifiers missing");
}
}
non_function(&Ds, &Dc)
]
|
{ if (! Ds.ds_sc_given && Ds.ds_notypegiven) {
{ if (! Ds.ds_sc_given && ! Ds.ds_typequal &&
Ds.ds_notypegiven) {
strict("declaration missing");
}
}