A strict warning was given too often
authorceriel <none@none>
Wed, 13 Mar 1991 10:11:25 +0000 (10:11 +0000)
committerceriel <none@none>
Wed, 13 Mar 1991 10:11:25 +0000 (10:11 +0000)
lang/cem/cemcom.ansi/decspecs.c
lang/cem/cemcom.ansi/program.g

index 83f081b..f7169dd 100644 (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);
 }
index 38333d5..0fc7481 100644 (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");
                        }
                }